Already sent to support.
Awesome. I found your email and just replied. I’ll copy my reply here, so others who may run into the same problem can understand where the problem comes from.
Your theme seems to use its own version of Fancybox, so things are a bit different from when you’re just using the plugin I mentioned above. That’s why I couldn’t reproduce on my end.
I checked a demo of the theme, and the problem seems to be the same, even when one doesn’t use Photon. Here is the theme’s demo site:
https://buildme.freevision.me/
Find one of the gallery images, and have a look at the structure of a gallery item:
https://i.wpne.ws/behz
Notice how the image is called twice, once in yellow via CSS, and once in blue as the gallery image itself? In both cases, the original version of the image is called, and not a thumbnail.
Both images are added in the theme, and don’t seem to be added later via Javascript, so the problem might not be linked to the Fancybox library included in the theme.
Since it’s a Premium theme I can’t download it to find out more, but the theme authors might be able to fix this issue if you let them know about it via their support site here:
https://freevision.ticksy.com/
They should be able to remove one of the calls to the image (most likely the inline CSS), and then fetch a smaller size of the image instead of calling the original version. If they use wp_get_attachment_image_src
(#) to get the image URL for example, they can call a custom image size they’d define with add_image_size
(#), or call one of the default core image sizes (medium
could be a good choice here for example).
Photon will then pick up the size being used, and return a cached version of the image matching that size.
Let me know if this helps!