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
The complete guide on how to use Magnific Popup - the open source responsive lightbox plugin.
🌐
Dimsemenov
dimsemenov.com › plugins › magnific-popup
Magnific Popup: Responsive jQuery Lightbox Plugin
Documentation · GitHub · WordPress plugin · How it was made · Three simple popups with different scaling settings.
🌐
GitHub
github.com › dimsemenov › Magnific-Popup
GitHub - dimsemenov/Magnific-Popup: Light and responsive lightbox script with focus on performance. · GitHub
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%
🌐
Ari-soft
ari-soft.com › docs › arimagnificpopup › v1 › en › html › index.html
"ARI Magnific Popup" documentation
This plugin does all magic to add lightbox effect. It supports ability to automatically convert existing links and images or add popup into a content via shortcodes. Button - ARI Magnific Popup plugin adds a button to editors which helps to generate and insert shortcodes.
🌐
Coremedia
documentation.coremedia.com › cmcc-11 › current › webhelp › frontend-en › content › BrickMagnificPopup.html
Frontend Developer Manual / 6.3.5 Magnific Popup
import { addNodeDecoratorByData } from "@coremedia/brick-node-decoration-service"; import { default as magnificPopup } from "@coremedia/brick-magnific-popup"; ...
🌐
GitHub
github.com › dimsemenov › Magnific-Popup › blob › master › website › documentation.md
Magnific-Popup/website/documentation.md at master · dimsemenov/Magnific-Popup
June 23, 2024 - Options for specific modules are explained in their sections of documentation (e.g. related to text are in translating section, related to gallery are in gallery section. Here you can find the list of general options: ... If window width is less than the number in this option lightbox will not be opened and the default behavior of the element will be triggered. Set to 0 to disable behavior. Option works only when you initialize Magnific Popup from DOM element.
Author   dimsemenov
🌐
Uxthemes
docs.uxthemes.com › ux themes docs › flatsome › magnific popup
Magnific Popup - UX Themes Docs
March 22, 2023 - Examples using this library to implement and use custom-coded popups (a library that comes within the theme and is lazy loaded) Ensure that dependencies are cor
Find elsewhere
🌐
Simmons University
web.simmons.edu › ~grovesd › comm244 › notes › week13 › magnific › magnific
How to Use Magnific | Comm244 Notes
Magnific requires it's own CSS code in order to display things properly. Simply add the magnific-popup.css to your page like a normal CSS document.
🌐
NuGet
nuget.org › packages › Magnific.Popup
NuGet Gallery | Magnific.Popup 1.1.0
February 22, 2016 - Magnific Popup is a responsive lightbox & dialog script that is focused on performance and providing best experience for user with any device (for Zepto.js or jQuery). Documentation can be found at http://dimsemenov.com/plugins/magnific-popup/documentation.html
🌐
Technical Manuals
manuals.muthu.co › posts › javascript-libraries-and-functions › magnific-popup.html
Magnific Popup - Documentation – Technical Manuals
Magnific Popup triggers several events throughout its lifecycle. You can listen for these events using jQuery’s .on() method to perform custom actions. Here are a few key events: beforeOpen: Fired before the popup opens. Useful for making last-minute modifications to the popup content or options. ... $(document).ready(function() { $('.my-popup-link').magnificPopup({ type: 'image', beforeClose: function(e) { if (!confirm('Are you sure you want to close?')) { e.preventDefault(); } } }); });
🌐
GitHub
github.com › dimsemenov › Magnific-Popup › blob › master › website › _includes › examples.html
Magnific-Popup/website/_includes/examples.html at master · dimsemenov/Magnific-Popup
$(document).ready(function() { $('.popup-gallery').magnificPopup({ delegate: 'a', type: 'image', tLoading: 'Loading image #%curr%...', mainClass: 'mfp-img-mobile', gallery: { enabled: true, navigateByImgClick: true, preload: [0,1] // Will preload 0 - before current, and 1 after the current image ·
Author   dimsemenov
🌐
GeeksforGeeks
geeksforgeeks.org › jquery › how-to-use-the-magnific-popup-jquery-plugin
How to Use the Magnific Popup jQuery Plugin? - GeeksforGeeks
July 15, 2025 - Magnific Popup is a fast, light, mobile-friendly and responsive lightbox and modal dialog jQuery plugin. It can be used to open inline HTML, ajax loaded content, image, form, iframe (YouTube video, Vimeo, Google Maps), and photo gallery.
🌐
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
🌐
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.
🌐
npm
npmjs.com › package › magnific-popup
magnific-popup - npm
March 22, 2017 - 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.. Latest version: 1.2.0, last published: 2 years ago. Start using magnific-popup in your project by running `npm i magnific-popup`...
      » npm install magnific-popup
    
Published   Jun 08, 2024
Version   1.2.0
Author   Dmytro Semenov
🌐
GitHub
github.com › dimsemenov › Magnific-Popup › blob › master › magnific-popup.jquery.json
Magnific-Popup/magnific-popup.jquery.json at master · dimsemenov/Magnific-Popup
"docs": "http://dimsemenov.com/plugins/magnific-popup/documentation.html", "author": { "name": "Dmytro Semenov", "email": "diiiimaaaa@gmail.com", "url": "http://dimsemenov.com" }, "repository": { "type": "git", "url": "https://github.com/dimsemenov/Magnific-Popup.git" }, "bugs": "https://github.com/dimsemenov/Magnific-Popup/issues", "dependencies": { "jquery": ">=1.8.0" }, "keywords": ["lightbox","popup","modal","window","dialog","ui","gallery","slideshow","video","image","ajax","html5","animation","jquery","photo","responsive","mobile"], "licenses": [ { "type": "MIT", "url": "http://www.opensource.org/licenses/mit-license.php" } ] }
Author   dimsemenov
🌐
GitHub
raw.githubusercontent.com › dimsemenov › Magnific-Popup › master › website › documentation.md
Githubusercontent
October 11, 2019 - --- layout: default title: Magnific Popup Documentation description: The complete guide on how to use Magnific Popup - the open source responsive lightbox plugin.
🌐
Stack Overflow
stackoverflow.com › questions › 30491022 › how-to-configure-magnific-popup
jquery - How to configure Magnific popup - Stack Overflow
After investigating further, I found that I was actually setting the plug-in up correctly using the configuration instructions in the docs here: http://dimsemenov.com/plugins/magnific-popup/documentation.html
🌐
jQuery Script
jqueryscript.net › demo › Powerful-Multi-Functional-jQuery-Lightbox-Plugin-Magnific-Popup
Magnific Popup Examples
This is dummy copy. It is not meant to be read. It has been placed here solely to demonstrate the look and feel of finished, typeset text. Only for show. He who searches for meaning here will be sorely disappointed · Lightbox has an option to automatically focus on the first input.