The simpler media website CMS
Using the cachemanager 1.6.1 does not generate these sizes below that are used by zpBootstrap. In the past I was able to create custom sizes. Has that option been moved or removed?....i can't find it.
caches size ---------------- where it's used
_400_admin.jpg - admin>album>images>crop thumbnail
_h110_thumb.jpg - admin>album>images
_h135_thumb.jpg - admin>album>custom order
The size below is the only size generated when checking all sizes for zpBootstrap, and this size does not appear to be used by my configuration.
_w1000_h500_cw1000_ch500
I try to generate ALL caches sizes locally and then upload bc my shared server has a total heart attack when asked to process images and I get throttled.
Comments
I excluded this one by mistake. This size is not generated using admin using any selection, (only on the fly) it is the main thumb for zpBootstrap:
_w360_h180_cw360_ch180_thumb
I should have added that I realize the other missing sizes are for admin, and may not be included in cachemanager by design, but I would like to be able to add them as custom sizes as in the past.
Of course you know you don't have to pre-cache technically as they are always created once. This is why not all admin sizes are registered ;-) It mostly has benefits on the front end as there might be more visitors.
The manual way via the backend has been removed with 1.6.1 as noted on the release post. Custom sizes must be registered via themes or plugins by code.
Would it be that difficult for me to code in my desired sizes? In the cachmanger or zpBootstrap? If I am throttled it can take hours just to load 100 images in the backend album settings. This then effects the loading of my site for 24 hours. As it is now I have to (locally) go through every page in the back end to generate all the cache sizes which ends up at 5 or 6 sizes.
Difficult is of course relative. The registering is following the normal template image functions. You can see examples in the official themes and also zpBootstrap itself.
Thanks!!!
As mentioned on another topic there is also a 3rd party plugin nameed SmartImageCache which perhaps might be of help on "smaller" hosts. I never find the need for it but the author specicially worked on it.
Thanks Malte. I tried the SmartimageCache plugin. Great addition to the cachmamager but it does not add any customizing capabilities. Just an FYI.
You have to register custom sizes as with the official plugin as it hooks on to it.
You mentioned admin sizes in use missing above. I was actutally not aware of that so we'll look into registering these if they are from official parts.
I figured out how to add custom cache sizes to the zpBootstrap theme. But......
How do i add the word "_thumb" or "_admin" to the generated file name? Using the code below from the zpBootstrap theme options file.
cacheManager::addCacheSize($me, NULL,NULL, 135, NULL, NULL, NULL, NULL, NULL, $img_wmk, $img_effect, false);
As you say I am missing some admin sizes, can you direct me to the file that set/handles the "admin" sizes.
Or is it possible to just ad my "admin" sizes to the theme options page for the time being.
After some testing, my site can require 10 sizes total and the theme options currently is generating a full image size that is not used.
The addCacheSizes() methods has a parameter for thumb that will add "_thumb" (as custom image functions do): https://docs.zenphoto.org/1.6.1/classes/cacheManager.html#method_addCacheSize
Thumbs and other sizes images are the same technically except that thumbs never have watermarks (as that usual makes no sense as they are small).
There is no "_admin" addition to the filename as there is no difference beween frontend or admin images.
We will handle the admin sizes, I don't know the actual file offhand where they are registered.
You can also add them to the theme for the time being if you really need to.
I have tried code like this but i can't seem to add "thumb". I assume if I don't add "thumb" it will not be recognized by ZP.
cacheManager::addCacheSize($me, NULL, 110, NULL, NULL, NULL, $thumb, $img_wmk, $img_effect, false);
As for missing sizes for admin, I do get one size named like this: "_400_admin" If I I visit crop thumbnail, which I do often due to zpBootsrap having square thumbnails and I often shoot 16x9, so the main subject is not in the thumb without adjusting the crop.
Ok....figured out the code to add custom sizes, and thumbs to a theme. Still haven't figured out exactly which file ads "_admin" to the file name used by the crop image admin page.
Regarding the "_admin" I indeed had to check our site to be sure but I could not find any such cache file in the image cache folder. So not sure where this comes from, I will have to reasearch that. Might be some old forgotten code… Generally there should not be such a specific "_admin" file especially to avoid same sizes being generated.
Searching file contents in zp-core for "400". finds a few candidates. The file "admin-thumbcrop" is probably the source or a clue.