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
Fullscreen Video Modal Boxes Delete Modal Timeline Scroll Indicator Progress Bars Skill Bar Range Sliders Color Picker Email Field Tooltips Display Element Hover Popups Collapsible Calendar HTML Includes To Do List Loaders Badges Star Rating User Rating Overlay Effect Contact Chips Cards Flip Card Profile Card Product Card Alerts Callout Notes Labels Ribbon Tag Cloud Circles Style HR Coupon List Group List Group with Badges List Without Bullets Responsive Text Cutout Text Glowing Text Fixed Footer Sticky Element Equal Height Clearfix Responsive Floats Snackbar Fullscreen Window Scroll Drawing
Discussions

Trying to show image in popup box when I hover over a button - HTML & CSS - SitePoint Forums | Web Development & Design Community
I am trying to get an image to show in a pop-up box when I hover over the button, my html is simple and shows a message when I try it but when I put an image into the code it does nothing. Sample button , this is the piano key i am sing. would any one have any ideas on how this can be done, ... More on sitepoint.com
🌐 sitepoint.com
0
August 5, 2016
Text link to image popup
Hi there, I'd like for some text on my homepage to open a popup of an image with a subtitle/caption when you click on the text link. More on forum.muffingroup.com
🌐 forum.muffingroup.com
August 19, 2020
I have developed a Responsive Popup Image Gallery in HTML, check and give you reviews.
You’re spamming this everywhere. So I’m gonna spam back with better galleries https://codestitch.app/app/dashboard/catalog/sections/5 More on reddit.com
🌐 r/webdev
4
0
June 13, 2024
[images module] Full size popup
In a simple site using the mainroad theme and the images module I have a page bundle that includes a png image. The images module allows me to use this in markdown content with ![Alt](image.png) The image is displayed and scaled to fit, nice, but I would have expected to be able to click on ... More on discourse.gohugo.io
🌐 discourse.gohugo.io
0
0
June 29, 2024
🌐
W3Schools
w3schools.com › css › css3_images_modal.asp
CSS Responsive Modal Images
When a user clicks on a modal image, it shows a popup window that appears on top of the main content of the webpage, often with a semi-transparent background. The modal must be closed by the user, typically with a "close" button or an "X" sign ...
🌐
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 - There are A LOT possibilities how to create pop-up modules. Some are just plain HTML+CSS but most of them take advantage of some sort of JavaScript (libraries).
🌐
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.
🌐
JCE
joomlacontenteditor.net › support › tutorials › jcemediabox › create-an-image-popup
Create an image Popup
Some formats such as images and social media like Youtube and Vimeo etc. can be detected from the popup url by JCE MediaBox · Parameters - Set additonal parameters. Click Insert. A browser cookie is used to store the autopopup state - whether it has been opened already - when using Autopopup Single. Example HTML created by these steps : <a class="jcepopup" title="Desert" href="/images/desert.jpg" data-mediabox="1" data-mediabox-group="nature" data-mediabox-title="Desert" data-mediabox-caption="Picture of a desert"><img title="winter.jpg" width="200" src="/images/desert.jpg" alt="Winter" /></a> Simple gallery using 2 grouped images ·
Find elsewhere
🌐
SitePoint
sitepoint.com › html & css
Trying to show image in popup box when I hover over a button - HTML & CSS - SitePoint Forums | Web Development & Design Community
August 5, 2016 - I am trying to get an image to show in a pop-up box when I hover over the button, my html is simple and shows a message when I try it but when I put an image into the code it does nothing. Sample button <!--<li><a href…
🌐
Hashnode
devlawrence.hashnode.dev › how-to-create-an-image-pop-up-gallery
How to create an image pop-up gallery - Dev Lawrence
August 31, 2022 - In this article, We will be creating ... of doing this is that when a user visits your website and clicks on an image in the image gallery, a larger version of that image should be opened in a modal....
🌐
Poper
poper.ai › guides › how-to-make-a-popup-image-in-html
How To Make a Popup Image in HTML - Poper
May 8, 2025 - How To Make a Popup Image in HTML: Discover step-by-step instructions to create responsive image popups using HTML, CSS, and JavaScript for an engaging user experience.
🌐
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
🌐
Sawtooth
community.sawtoothsoftware.com › lighthouse-studio › post › image-in-html-popup-window-HndfmgjKyMhurjT
Image in HTML popup window
March 24, 2023 - Hi all, I have created a separate html file that is a popup window in my survey. I saved the html file within the graphics folder. I want to display a picture of the radiobutton_unselected.png within ...
🌐
Muffingroup
forum.muffingroup.com › betheme › discussion › 55806 › text-link-to-image-popup
Text link to image popup — Betheme Support Forum
August 19, 2020 - About the image, you can insert the <img> tag or [image] shortcode inside the content of the popup/lightbox.
🌐
Reddit
reddit.com › r/webdev › i have developed a responsive popup image gallery in html, check and give you reviews.
r/webdev on Reddit: I have developed a Responsive Popup Image Gallery in HTML, check and give you reviews.
June 13, 2024 - A website builder that lets you download the site as an HTML/CSS template and does not require signing up. ... Looking to create a woo product slideshow (using ACF image) with popup for adding to cart.
🌐
HUGO
discourse.gohugo.io › using themes
[images module] Full size popup - Using Themes - HUGO
June 29, 2024 - In a simple site using the mainroad theme and the images module I have a page bundle that includes a png image. The images module allows me to use this in markdown content with ![Alt](image.png) The image is displayed and scaled to fit, nice, but I would have expected to be able to click on ...
🌐
DEV Community
dev.to › sarah_chima › image-popup-on-hover-1kee
Image Popup on hover - DEV Community
October 12, 2018 - I did not know how to do it but ... This technique is placing two images side by side, the thumbnail image(smaller image) and a larger image which will appear when you hover over the thumbnail image....
🌐
Reddit
reddit.com › r/html5 › pop-up image gallery in html
r/html5 on Reddit: Pop-up image gallery in Html
March 14, 2024 - Click image > popup with text on and link to another url · r/Wordpress • · r/Wordpress · The place for news, articles and discussion regarding WordPress, the open source software.
Top answer
1 of 1
7

I would do this with jQuery (and I bet you're using jQuery for your template too :) )

Be sure you're calling the jQuery library in your page, I would recommend to place it just before the </body> tag and BELOW all the scripts.

for example

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <!-- let's call the following div as the POPUP FRAME -->
<div id="popup">

    <!-- and here comes the image -->
    <img src="http://i.imgur.com/cVJrCHU.jpg" alt="popup">

        <!-- Now this is the button which closes the popup-->
        <button id="close">Close button</button>

        <!-- and finally we close the POPUP FRAME-->
        <!-- everything on it will show up within the popup so you can add more things not just an image -->
</div>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

<script>
//your jquery script here
</script>

</body>
</html>

This will show up a piece of code, if you want to simply show an image, put the id="popup" directly on your <img> tag.

Now, let's move to the example... the code is pretty easy to understand:

//with this first line we're saying: "when the page loads (document is ready) run the following script"
$(document).ready(function () {

    //select the POPUP FRAME and show it
    $("#popup").hide().fadeIn(1000);

    //close the POPUP if the button with id="close" is clicked
    $("#close").on("click", function (e) {
        e.preventDefault();
        $("#popup").fadeOut(1000);
    });

});

The script behaves like this: When the page is loaded, the content inside <div id="popup"> show up, and if the button with id="close" is clicked, then the pop up is hidden. Add whatever you want inside this <div id="popup"> and it will show inside the popup.

The CSS: SUPER IMPORTANT!

/*we need to style the popup with CSS so it is placed as a common popup does*/
    #popup {
            display:none;
            position:absolute;
            margin:0 auto;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 9999;
    }

You can see it working along with the HTML on this live example:

http://jsfiddle.net/Lp9edyg5/1/

🌐
Dimsemenov
dimsemenov.com › plugins › magnific-popup
Magnific Popup: Responsive jQuery Lightbox Plugin
Three simple popups with different scaling settings. 1 — fits horizontally and vertically, 2 — only horizontally, 3 — no gaps, zoom animation, close icon in top-right corner. You may put any HTML content in each gallery item and mix content types. In this example lazy-loading of images is enabled for the next image based on move direction.
🌐
Squarespace Forum
forum.squarespace.com › home › customize with code › other › adding a pop up window to an image, containing text and images
Adding a pop up window to an image, containing text and images - Other - Squarespace Forum
April 17, 2024 - Hi there! I'm currently building a website for a physio client, and I want to explore using a pop up window to show more details of particular treatment areas. I can't share the URL, but I've taken a screenshot and created a mock up of what I'm trying to achieve. I'd like to be able to click on t...