hi @bionary,
We did some testing on our end before replying.
Firstly, for the general retina settings it looks like you have found a bug, whereby the settings are not being saved when you click “Save changes”. Apologies for this, and this will be corrected in the next release.
We then did some tests for a gallery and by using the Retina metabox when editing a gallery, checking the output HTML you get this for a thumb in the gallery (with 2x and 3x) on a device that has a higher pixel density:
<img title="Some image" width="150" height="150"
data-src-fg="https://foo.dev.cc/wp-content/uploads/cache/2018/12/111/2109244979.jpg"
data-srcset-fg="https://foo.dev.cc/wp-content/uploads/cache/2018/12/111/3307239617.jpg 300w,
https://foo.dev.cc/wp-content/uploads/cache/2018/12/111/609083049.jpg 450w" class="fg-image" src="https://foo.dev.cc/wp-content/uploads/cache/2018/12/111/3307239617.jpg" style="">
You can see that the FooGallery script substitutes the correct 300w retina thumb (3307239617.jpg) into the src attribute of the thumb on my device with 2x pixel density.
Regarding storage, the retina image files are not suffixed with @2x and they will be created/stored in the cache folder along with the other image sizes created (see above image paths).
Then onto the lightbox – this is a separate plugin to the gallery and it loads the fullsize/fullres image that the gallery references in the anchor href.
-
This reply was modified 6 years, 9 months ago by
bradvin.
@bradvin Thank you for your clear explanation.
I think I see what’s happening now… foogallery is detecting the retina/high-pixel density ahead of time and then serving the appropriate image directly. It seems the code is not utilizing the srcset attribute but using data-srcset-fg for internal computing I suppose.
It would be great if the lightbox also did this kind of optimizing for hi-rez images too.
Thanks!