![]() |
|
getCustomImageURL & srcset - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Themes (https://forum.zenphoto.org/forum-5.html) +--- Thread: getCustomImageURL & srcset (/thread-13521.html) |
getCustomImageURL & srcset - Roland - 25-02-2021 Hello ! Theoretically this code should be okay :
But's it's not working :p The generated html is : So I'm guessing, Zenphoto cache only for the src attribute. Is this something I can trick anywhere ? Maybe theme functions ? Thanks for your help ! getCustomImageURL & srcset - acrylian - 25-02-2021 All is fine actually. The urls you see are the image processor urls. These are only executed on request, if needed. Since the browser here picks the image size automatically it thinks is best, these are not picked and therefore not executed. The browser picks this based on teh browser window width and image widht needed for display and on page reload, not on the fly. You can register the sizes with the cacheManager to pre-cache them manually. But this is normally not needed. getCustomImageURL & srcset - Roland - 25-02-2021 Thanks Acrylian !! I figured out why I had error with some pictures. Now it's working : https://archives.rolandtisserand.fr/cycling-amsterdam-paris/20150613-_mg_9483.jpg I'm just a bit disappointed because the browser doesn't reload the right img on the fly. But's it's not a Zenphoto issue ! getCustomImageURL & srcset - acrylian - 25-02-2021 Good you got it working. I guess some French special chars/accents caused trouble?
Yeah, but after the page has been loaded it would need extra JS for that. Thus the reload. But who know what they might do in the future. getCustomImageURL & srcset - Roland - 25-02-2021 You guess right :) |