Just add delegate: 'a' to your jquery function and make sure the img tag contains the full res image while the href contains the thumbnail.

$('.popupgallery').magnificPopup({ 
    type: 'image', 
    delegate: 'a', 
    closeOnContentClick: true, 
    image: { 
        verticalFit: false 
    } 
}); 
Answer from Saturnix on Stack Overflow
🌐
Dimsemenov
dimsemenov.com › plugins › magnific-popup › documentation.html
Magnific Popup Documentation
You can get Magnific Popup JS and CSS file from the dist/ folder in the GitHub repository, or by compiling it yourself with Grunt.
🌐
GitHub
github.com › dimsemenov › Magnific-Popup
GitHub - dimsemenov/Magnific-Popup: Light and responsive lightbox script with focus on performance. · GitHub
Use native <dialog> element if you need a basic dialog/modal/popup, or my PhotoSwipe library if you need an advanced image gallery. Feel free to email me if you need assistance. Fast, light and responsive lightbox plugin, for jQuery and Zepto.js. Documentation and getting started guide. Examples and plugin home page. More examples in CodePen collection. Optionally, install via Bower bower install magnific-popup or npm: npm install magnific-popup.
Starred by 11.4K users
Forked by 3.4K users
Languages   JavaScript 67.9% | HTML 18.5% | CSS 8.1% | SCSS 5.5%
🌐
GitHub
github.com › prabinmagar › simple-magnific-popup-vanilla-js
GitHub - prabinmagar/simple-magnific-popup-vanilla-js
Contribute to prabinmagar/simple-magnific-popup-vanilla-js development by creating an account on GitHub.
Author   prabinmagar
🌐
Dimsemenov
dimsemenov.com › plugins › magnific-popup
Magnific Popup: Responsive jQuery Lightbox Plugin
Light and open source responsive lightbox plugin with focus on performance, for jQuery and Zepto.js. High-DPI (retina) display support, fast tap for touch devices.
🌐
YouTube
youtube.com › geekprobin
Simple Magnific Popup | Vanilla JS Project - YouTube
Simple Magnific Popup | Vanilla JS Project👨‍💻 Source Code: https://github.com/prabinmagar/simple-magnific-popup-vanilla-js.gitFollow me on:Github: https://...
Published   January 7, 2021
Views   1K
🌐
cdnjs
cdnjs.com › home › libraries › magnific-popup.js
magnific-popup.js - Libraries - cdnjs - The #1 free and open source CDN built to make life easier for developers
magnific-popup.js · Lightbox and modal dialog plugin. Can display inline HTML, iframes (YouTube video, Vimeo, Google Maps), or an image gallery. Animation effects are added with CSS3 transitions.
Find elsewhere
🌐
YouTube
youtube.com › code with abdullah nahian
How to use Magnific Popup jQuery Plugin | Image Popup | Image Gallery, iframe Video Popup Lightbox - YouTube
Become a Pro: Learn Premium Web Development & WordPress with Me! - https://rebrand.ly/premium-webdevelopment-coursesHello! Thanks for checking out this video...
Published   October 2, 2022
Views   4K
🌐
JQuery
plugins.jquery.com › magnific-popup
Magnific Popup | The jQuery Plugin Registry
lightbox popup modal window dialog ui gallery slideshow video image ajax html5 animation jquery photo responsive mobile
🌐
GitHub
github.com › prabinmagar › simple-magnific-popup-vanilla-js › blob › master › script.js
simple-magnific-popup-vanilla-js/script.js at master · prabinmagar/simple-magnific-popup-vanilla-js
March 22, 2023 - Contribute to prabinmagar/simple-magnific-popup-vanilla-js development by creating an account on GitHub.
Author   prabinmagar
🌐
GitHub
github.com › prabinmagar › simple-magnific-popup-vanilla-js › blob › master › style.css
simple-magnific-popup-vanilla-js/style.css at master · prabinmagar/simple-magnific-popup-vanilla-js
March 4, 2017 - Contribute to prabinmagar/simple-magnific-popup-vanilla-js development by creating an account on GitHub.
Author   prabinmagar
🌐
GitHub
github.com › prabinmagar › simple-magnific-popup-vanilla-js › tree › master › img
simple-magnific-popup-vanilla-js/img at master · prabinmagar/simple-magnific-popup-vanilla-js
January 12, 2023 - Contribute to prabinmagar/simple-magnific-popup-vanilla-js development by creating an account on GitHub.
Author   prabinmagar
🌐
npm
npmjs.com › package › magnific-popup
magnific-popup - npm
June 8, 2024 - Lightbox and modal dialog plugin. Can display inline HTML, iframes (YouTube video, Vimeo, Google Maps), or an image gallery. Animation effects are added with CSS3 transitions. For jQuery or Zepto..
      » npm install magnific-popup
    
Published   Jun 08, 2024
Version   1.2.0
Author   Dmytro Semenov
🌐
GeeksforGeeks
geeksforgeeks.org › jquery › how-to-use-the-magnific-popup-jquery-plugin
How to Use the Magnific Popup jQuery Plugin? - GeeksforGeeks
July 15, 2025 - IN this approach, we have created a small popup using the Magnific Popup library. It includes necessary CSS and JavaScript files from CDNs. A button is provided, and when clicked, it opens a small popup displaying "GEEKSFORGEEKS" and "WELCOME ...
🌐
SourceForge
sourceforge.net › projects › magnific-popup.mirror
Magnific Popup download | SourceForge.net
June 8, 2024 - Magnific Popup is a responsive lightbox & dialog script with focus on performance and providing best experience for user with any device. You may put any HTML content in each gallery item and mix ...
🌐
npm Trends
npmtrends.com › magnific-popup-vs-micromodal-vs-tingle.js-vs-vanilla-modal-vs-vex-js
magnific-popup vs micromodal vs tingle.js vs vanilla-modal vs vex-js | npm trends
Comparing trends for magnific-popup 1.2.0 which has 83,313 weekly downloads and 11,368 GitHub stars vs. micromodal 0.6.1 which has 50,547 weekly downloads and 3,620 GitHub stars vs. tingle.js 0.16.0 which has 3,523 weekly downloads and 1,562 GitHub stars vs. vanilla-modal 1.6.5 which has 8,301 weekly downloads and unknown number of GitHub stars vs. vex-js 4.1.0 which has 8,194 weekly downloads and 6,910 GitHub stars.
🌐
Libhunt
js.libhunt.com › magnific-popup-alternatives
Magnific-Popup Alternatives - JavaScript Modals and Popups | LibHunt
June 8, 2024 - Fast, light and responsive lightbox plugin, for jQuery and Zepto.js. Documentation and getting started guide. Examples and plugin home page. More examples in CodePen collection. Optionally, install via Bower bower install magnific-popup or npm: npm install magnific-popup.