Plugin use conflict / srcset affecting lightbox image size
-
Hello Jordy and the Meow team:
I’ve been using Meow Lightbox for a while now, generating all the lightboxes on my site – including gallery images created by another plugin, Modula.
Modula has it’s own lightbox (FancyBox) installed in it, but I have the option to remove lightbox hyperlinks on any gallery I choose. Since Modula doesn’t allow me to easily apply FancyBox automatically to the rest of my site, it’s a no-brainer which lightbox I prefer to use.
This has worked out fine – until now. For a long time, their plugin had an issue where it was not calling the proper scaled image via srcset for alternate URL paths (I serve images from media.bikesharemuseum.com). Since then, they’ve fixed it – but the change has resulted in Meow opening up the srcset-sized thumbnail in the lightbox as opposed to the full image (regardless of what’s set under Performance > Image Size).
This is not currently reflected on the site (as I would prefer a lightbox to be functional), but I’ve been testing a copy on XAMPP to this effect. As such, this is an example of the current code for a given image in a gallery:
<div class="modula-item-content"> <img class="pic mwl-img" data-valign="middle" data-halign="center" alt="" data-full="https://media.bikesharemuseum.com/2020-10-22-BGB-SoBi-3.jpg" title="" width="240" height="180" src="https://media.bikesharemuseum.com/2020-10-22-BGB-SoBi-3-240x180.jpg" data-src="https://media.bikesharemuseum.com/2020-10-22-BGB-SoBi-3-240x180.jpg" data-caption="" srcset="https://media.bikesharemuseum.com/2020-10-22-BGB-SoBi-3-240x180.jpg 240w, https://media.bikesharemuseum.com/2020-10-22-BGB-SoBi-3-300x225.jpg 300w, https://media.bikesharemuseum.com/2020-10-22-BGB-SoBi-3-768x576.jpg 768w, https://media.bikesharemuseum.com/2020-10-22-BGB-SoBi-3-1200x900.jpg 1200w, https://media.bikesharemuseum.com/2020-10-22-BGB-SoBi-3.jpg 1500w" sizes="(max-width: 240px) 100vw, 240px" style="inset: 0px auto auto -30.0833px; width: auto; height: 180px; margin: 0px; max-width: 999em;" mwl-index="1"></div>
If I target .pic or .mwl-img, I get the small image.
Any ideas?
-Kurt
The page I need help with: [log in to see the link]
- The topic ‘Plugin use conflict / srcset affecting lightbox image size’ is closed to new replies.