You can use a lightbox to do it.

There is a simple example in this link:

http://lokeshdhakar.com/projects/lightbox2/

Answer from Jack on Stack Overflow
🌐
W3Schools
w3schools.com › howto › howto_css_modal_images.asp
How To Create Modal Images
Learn how to create responsive Modal Images with CSS and JavaScript. A modal is a dialog box/popup window that is displayed on top of the current page.
Discussions

Show clicked image on page in popup modal
Thanks @webdev ! This solve 1 of 2 things 😀 The second is about images. I have to work in an online catalogue. I have a collection with products, placed in a div with a button. When a user clics on the button, it displays a popup. I want to show, in this modal, the image of the item clicked. More on discourse.webflow.com
🌐 discourse.webflow.com
0
March 15, 2019
Want image hyperlink to open in popup, rather than new window - Support - Themeco Forum
Hello, fantastic ThemeCo support folks! I am trying to get a clickable image to open a link in a popup window. (The link is to a page off my domain.) The image element provides an “open in new window” option, but not a popup. In the first screenshot below, please see the Custom Headline ... More on theme.co
🌐 theme.co
4
0
May 28, 2017
Text pop up when you click a picture
Hey, does anybody know a simple way to make text pop up when you click on a picture? I want to make a quizz with 4 pictures that can be clicked on. when you choose the right picture, there should be a “yes you’re right” popup and when you click one of the other pictures, there should ... More on discourse.getgrav.org
🌐 discourse.getgrav.org
0
May 21, 2020
Make a click on an image generate a popup
The answer is that there are a lot of solutions to this both via plugin or raw code. The effect is generally called "modal popup" or "lightbox" (named after a plugin everyone used for years to do this back in the day). To achieve the effect, one uses css, often in conjunction with a javascript click event handler though there are clever ways to get around using js if that is needed. If you are curious, here is an example of a simple image gallery which is using the CSS only approach. Here is a quickie example I spun up to show how it works with JS. If you notice in the JS panel there - all I am doing really is adding and removing classes on the body and the modal. So it's not terrifically complicated. Not sure if that solves your problem, but hopefully it informs your search a bit more. Much luck! More on reddit.com
🌐 r/Wordpress
2
1
December 16, 2019
🌐
HubSpot
community.hubspot.com › t5 › Blog-Website-Page-Publishing › Need-to-create-a-popup-on-click-of-an-image › m-p › 808975
Solved: HubSpot Community - Need to create a popup on click of an image - HubSpot Community
July 4, 2023 - Hello, I have created a sample header and footer for our revised blog design. I have a requirement for the same. It is to open a popup box on click of a button. It seemed to work from creating a sample page in hubspot. I had created a page added a button and added the popup form using new popup CTA ...
🌐
GeeksforGeeks
geeksforgeeks.org › html › how-to-show-images-on-click-using-html
How to Show Images on Click using HTML ? - GeeksforGeeks
The image's src attribute is set to the desired URL, and the element is appended to the DOM, making the image appear on the webpage when a button is clicked. Example: In this example, clicking the "Show Image" button creates an image container ...
Published   January 10, 2025
🌐
Unc
opal.ils.unc.edu › ~lblakej › website-helps › 04-image-popup
Image Popup Example
Click image to popup the larger image with the alt text as the caption. Adapted from this example at W3 Schools. Popups are often called a "Modal." To see the code and instructions on the steps you need to take to get this to work, right-click and view page source.
🌐
Webflow
discourse.webflow.com › design help › animations & interactions
Show clicked image on page in popup modal - Animations & Interactions - Forum | Webflow
March 15, 2019 - Thanks @webdev ! This solve 1 of 2 things :grinning: The second is about images. I have to work in an online catalogue. I have a collection with products, placed in a div with a button. When a user clics on the button, i…
🌐
W3Schools
w3schools.com › howto › howto_js_popup.asp
How To Create Popups
Alert Buttons Outline Buttons Split Buttons Animated Buttons Fading Buttons Button on Image Social Media Buttons Read More Read Less Loading Buttons Download Buttons Pill Buttons Notification Button Icon Buttons Next/prev Buttons More Button in Nav Block Buttons Text Buttons Round Buttons Scroll To Top Button · Login Form Signup Form Checkout Form Contact Form Social Login Form Register Form Form with Icons Newsletter Stacked Form Responsive Form Popup Form Inline Form Clear Input Field Hide Number Arrows Copy Text to Clipboard Animated Search Search Button Fullscreen Search Input Field in Navbar Login Form in Navbar Custom Checkbox/Radio Custom Select Toggle Switch Check Checkbox Detect Caps Lock Trigger Button on Enter Password Validation Toggle Password Visibility Multiple Step Form Autocomplete Turn off autocomplete Turn off spellcheck File Upload Button Empty Input Validation
Find elsewhere
🌐
Themeco
theme.co › support
Want image hyperlink to open in popup, rather than new window - Support - Themeco Forum
May 28, 2017 - Hello, fantastic ThemeCo support folks! I am trying to get a clickable image to open a link in a popup window. (The link is to a page off my domain.) The image element provides an “open in new window” option, but not a popup. In the first screenshot below, please see the Custom Headline ...
🌐
Grav Community Forum
discourse.getgrav.org › t › text-pop-up-when-you-click-a-picture › 12444
Text pop up when you click a picture - Grav Community Forum
May 21, 2020 - Hey, does anybody know a simple way to make text pop up when you click on a picture? I want to make a quizz with 4 pictures that can be clicked on. when you choose the right picture, there should be a “yes you’re right” popup and when you click one of the other pictures, there should ...
🌐
Our-Hometown
our-hometown.com › how to open a popup on the image click
How to open a popup on the Image click - Our-Hometown
October 4, 2017 - To create an Onclick popup, please, follow the steps bellow: 1. Go to the Pages/Posts section of your Dashboard 2. Choose the Page/Post you want to add an Onclick popup 3. Click “Insert popup” 4. From the box, select the popup you need to open Onclick 5. Choose the load type, select “Click” 6. Insert 7. Place your cursor inside the shortcode of the popup and click Add media 8. Select your image and insert it 9.
🌐
WowOptin
wowoptin.com › make-an-image-popup-in-wordpress
How to Make an Image Popup in WordPress [On Hover, Click & without Plugin]
June 29, 2025 - Click the edit button of the page. Here, you have to add a custom HTML block which will contain the custom code for image popup. Now, add the custom code in the block. I have used a simple code snippet for a modal image popup on click.
🌐
PopupAlly
popupally.com › home › kb articles › installation & setup › how to create a click-to-open popup (image-trigger) in popupally
How to Create a Click-to-Open Popup (Image-trigger) in PopupAlly
July 10, 2024 - With PopupAlly Pro, you can create a click-to-open popup that is triggered when someone clicks on an image. This tutorial video shows you how to make it happen: PopupAlly is a WordPress popup plugin and it integrates with these email marketing systems: ... PopupAlly is compatible with all email marketing tools that use custom HTML forms.
🌐
Shopify Community
community.shopify.com › store design
How To Have a Link To an Image Popup On Product Page?
December 18, 2024 - Hey, I want to be able to add some text on my product page that when you click it, an image pops up. (See attatched photos) I can link the store below but when the text was clicked, an image popped up instead of changing…
🌐
Shoptimized
help.shoptimized.net › en › funnel-buildr › how-to-create-a-clickable-image-popup-2
How to Create a Clickable Image Popup
+P,function(){R()})},getIframe:function(b,c){var d=b.src,e=n.st.iframe;a.each(e.patterns,function(){if(d.indexOf(this.index)>-1)return this.id&&(typeof this.id=="string"?d=d.substr(d.lastIndexOf(this.id)+this.id.length,d.length):d=this.id.call(this,d)),d=this.src.replace("%id%",d),!1});var f={};return e.srcAction&&(f[e.srcAction]=d),n._parseMarkup(c,f,b),n.updateStatus("ready"),c}}});var S=function(a){var b=n.items.length;return a>b-1?a-b:a<0?b+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMark
🌐
CodePen
codepen.io › Muhnad › pen › dMbXNb
image popup
$(function () { "use strict"; $(".popup img").click(function () { var $src = $(this).attr("src"); $(".show").fadeIn(); $(".img-show img").attr("src", $src); }); $("span, .overlay").click(function () { $(".show").fadeOut(); }); });
🌐
SitePoint
sitepoint.com › javascript
How to open image in popup window?
June 30, 2016 - Hi I want to open selected Image on popup window this is I have tried so far there are two things that I am not able to do so far 1)When I click on Image at bottom image in popup window not display on full window.I have to scroll up to see that Image 2)I want to disable click on window when ...
Top answer
1 of 2
1

The span elements should be completely removed and its classes placed on the image elements themselves.

Also, you have a nested section element that isn't doing anything for you.

Lastly, do not use HTML heading elements (<h1>...<h6>) because of the way they style the text. Formatting is the job of CSS. Instead of headings, it is more appropriate to surround each image and its accompanying text with figure and figcaption elements.

img { 
  width:200px;
  border:1px solid black; /* This is only added for testing purposes*/
}

.thumbnail:hover {
   width: 500px;
   height:auto;
   position:relative;
   /* push image to the right by 1/2 the screen width and 1/2 the image width */
   margin-left:calc(50% - 250px);
}
<section id="main">
  <div class="inner">
    <div class="box alt">
      <div class="row 50% uniform">
         <div class="4u">
           <figure>
             <img src="https://pbs.twimg.com/profile_images/562466745340817408/_nIu8KHX.jpeg" alt="" class="thumbnail">
             <figcaption>Marble</figcaption>
           </figure>
         </div>

         <div class="4u">
           <figure>
             <img src="http://www.critterbabies.com/wp-content/gallery/kittens/cats-animals-kittens-background-us.jpg" alt="" class="thumbnail">
             <figcaption>Marble</figcaption>
           </figure>
         </div>
         
         <div class="4u">
           <figure>
             <img src="http://www.warrenphotographic.co.uk/photography/bigs/08482-Fluffy-ginger-female-kitten.jpg" alt="" class="thumbnail">
             <figcaption>Marble</figcaption>
           </figure>
         </div>
         
       </div>
     </div>
   </div>
 </section>

2 of 2
1

I've taken Scott Marcus' answer and adapted to click, which was your original request.

The main diffence is the addition of a tags targeting elements on the page and using :target in the css.

img { 
  width:200px;
  border:1px solid black; /* This is only added for testing purposes*/
}

.thumbnail:target {
   width: 500px;
   height:auto;
   position:relative;
   /* push image to the right by 1/2 the screen width and 1/2 the image width */
   margin-left:calc(50% - 250px);
}
<section id="main">
  <div class="inner">
    <div class="box alt">
      <div class="row 50% uniform">
         <div class="4u">
           <figure>
             <a href="#image1">
             <img src="https://pbs.twimg.com/profile_images/562466745340817408/_nIu8KHX.jpeg" alt="" class="thumbnail" id="image1">
             </a>
             <figcaption>Marble</figcaption>
           </figure>
         </div>

         <div class="4u">
           <figure>
             <a href="#image2">
             <img src="http://www.critterbabies.com/wp-content/gallery/kittens/cats-animals-kittens-background-us.jpg" alt="" class="thumbnail" id="image2">
             </a>
             <figcaption>Marble</figcaption>
           </figure>
         </div>
         
         <div class="4u">
           <figure>
             <a href="#image3">
             <img src="http://www.warrenphotographic.co.uk/photography/bigs/08482-Fluffy-ginger-female-kitten.jpg" alt="" class="thumbnail" id="image3">
             </a>
             <figcaption>Marble</figcaption>
           </figure>
         </div>
         
       </div>
     </div>
   </div>
 </section>

🌐
HUGO
discourse.gohugo.io › support
Enlarge image on click / image popup - support - HUGO
September 22, 2024 - Hi, I search a possibility to give the users who reads message to click on images to enlarge them. I found that thread and the solution: Works in that way that it opens the image as full image in the browser, but …