![]() |
|
Pre cache image file name does not match with automatic generation of ZP - 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: Pre cache image file name does not match with automatic generation of ZP (/thread-13542.html) |
Pre cache image file name does not match with automatic generation of ZP - davidarnoult - 13-03-2021 Hi! I use in my theme this function I wish to precache this size in my theme: Can you give me the rule on how to get the proper CacheSize file? Pre cache image file name does not match with automatic generation of ZP - davidarnoult - 13-03-2021 Finally I found it by myself ;-) [code]printCustomSizedImage(gettext('Gallery'), 1140, null, null, 1140, 400, null, null, 'img-fluid');[/code] with [code]cacheManager::addCacheSize($me, 1140, null, null, 1140, 400, null, null, false, false);[/code] generates the exact same image with same filename and use the cache version. Pre cache image file name does not match with automatic generation of ZP - acrylian - 13-03-2021 The image parameters can be a bit tricky at times. Acthually both setting should generally create the same sized file, thus with a different name. But the 2nd seems generally the better way. Pre cache image file name does not match with automatic generation of ZP - davidarnoult - 13-03-2021 Thanks @acrylian for confirming. I had to test with different parameters, it is part of the dev process ;-) |