hi,
for my personnal needs, I use some custom cache image sizes in news to have original layouts (eg with isotope).
you can see this news as example: https://www.vincentbourganel.fr/news/randonnee-au-rocher-du-playnet-la-troisieme-fut-la-bonne/
for example, I have cache image name like:
/cache/images/photos-du-mois/img_1896_w767_h511_cw1100_ch733.jpg and
/cache/images/photos-du-mois/img_9677_w250_h250_cw734_ch734_cx110_cy0.jpg.
there was a time, with cache image manager, and 'cache stored images' tab, these cache images was generated.
since few time (I don't know when), cache image manager doesn't create cache images but a visit with FE generates it.
now (sine latetest release), cache image manager doesn't create cache images and a visit with FE doesn't generate it anymore.
you can see this news as example: https://www.vincentbourganel.fr/news/randonnee-au-rocher-du-playnet-bis-repetita/
what is the matter?
Actually that should work as usual. Nothing to the actual handling change except the way cacheimages are generated. You might want to try the support build and make sure the cachemanager where you can choose how images are generated: Legacy mode (images are printed) and cURL (images are generated by a request).
For some reason the actual more reliable cURL mode is not working as reliable on every server. It does work fine and better on my local and my servers incl. zenphoto.org but for example not on Fretzl's. We couldn't find out why. Perhaps that is what you are encountering.
I fear I can somehow reproduce this and it has nothing to do with the cURL vs legacy mode. Not sure how we missed that but we did naturally test it with all the cachemanager changes. The actual logic for image discovery within text didn't change actually. Will take a look…
I don't speak about images in albums.
I speak about 'cache stored images' tab of cache manager.
what this feature is supposed to do and how it is supposed to work?
as far I can read, it is supposed to do 2 different things:
[img]/zp-core/i.php?a=20110721-vacances-ete-pays-basque&i=img_5671.jpg&w=800&h=189&cw=1100&ch=260&cx=0&cy=40[/img] is found in a news content, it is supposed to be converted to [img]/cache/20110721-vacances-ete-pays-basque/img_5671_w800_h189_cw1100_ch260_cx0_cy40.jpg[/img].right ?
[img]/cache/20110721-vacances-ete-pays-basque/img_5671_w800_h189_cw1100_ch260_cx0_cy40.jpg[/img] is supposed to be created.right ?
as far I can test, both of these items aren't working as expected:
image processor URI are not converted, and cached images of images in news/pages contents are not created with this tab of cache manager (no matter if generated by tinyZenpage - with custom size -, or manually created - as I know the internal structure of cached images -, as I have to do for my personnal layouts in news contents).
we have to visit news/page from the front-end to create theses cache images.
it works in the past (it was a feature request of mine, and stephen worked on it).
Yes, that is how it is supposed to work. And as mentioned I can reproduce this not working correctly. I will take a look what's going on there (or what not specifially).
As mentioned before in the future embedded images will be using a content macro - which I sometime soon will add - which should be used preferredly. It has a lot of benefits as being indepedent from any url structure and also can cover missing images without showing broken ones. Addtionally it can incorporate any caption structure additionally. Drawback is of course there is no live preview in edit mode anymore then.
I missed something:
cache image for "complex" custom sized images like [img]/cache/20110721-vacances-ete-pays-basque/img_5671_w800_h189_cw1100_ch260_cx0_cy40.jpg[/img] are not created when I visit my news from the front-end.
it's really annoying because many of my news have missing images and I need to generate the cached images manually by calling i.php in debug mode. very long and very painful with a lot of pictures.
a macro content to add an image sized as we want (ie with all the possible parameters of i.php: s, w, h, cw, ch, cx, cy... and more: class, alt,...) would be a VERY nice improvement.
So I found something out: Is your site perhaps using the "protect image cache" option? Then this is the cause. If enabled you always get i.php thus no cache file references works and generates anything. Also for the same reason the cache db images is not working either.
At least that is what I can reproduce.
That mode is not recommended anyway as it seriously slows down the site because of extra overhead. As the option text notes.
I don't use that option.
the cache image name above is given by i.php, so it should be correct.
okay, good. But then I fear I cannot reproduce it. But I can partly reproduce the issue you reported on https://forum.zenphoto.org/discussion/1410404/wrong-custom-size-with-png-file#latest Although only for embedded images as it seems.
the way I do (and maybe, steps to reproduce for you):
http://domain_name/zp-core/i.php?a=album_name&i=image_name.jpg&w=Width_value&h=Height_value&cw=Crop_width_value&ch=Crop_height_value. you can temporary add &debug to see the custom sized picture in your browser http://domain_name/cache/album_name/image_name_wWidth_value_hHeight_value_cwCrop_width_value_chCrop_height_value.jpg) in the source code of a news.in my case, nothing appends and custom cache image is not created.
Sorry, my above replies where in the wrong topic and referred to https://forum.zenphoto.org/discussion/1410404/wrong-custom-size-with-png-file#latest
I tried latest build, but nothing changes with my cache custom sized pictures not generated.
Good news: We were able to reproduce it. Bad news: There will be no fix.
We found out this: Reason is that your image filename name has a number:
img_1896.jpg gets a cache name like img_1896_w767_h511_cw1100_ch733.jpg.
Now the 1896 is misunderstood as the "size" parameter which is the only one that has no char prepended. For example img_1896.jpg could be an uncropped sized image of img.jpg with width (depending on options and orientation) 1896px.
This does only happen which images named like this and only within text content like pages or articles. It does not happen within normal theme context using theme functions because there it is "known" what the actual image file name part is and what not.
So the only fix is to rename the image (e.g. img_1896.jpg to img-1896.jpg). The content macro I will start working on should fix this.
It's very annoying
why size parameter is not prepended by "s" as "w" for width?
so there would be no ambiguity and a custom sized cache name would be like img_1896_s767_cw1100_ch733.jpg
it would be a huge work to rename all pictures of my gallery (and be carefull of lost date).
and btw, using "_" is a common syntax for naming of pictures...