If I change the theme Image size option from 640 to 800, the cache image URL also changed:
For example, if I view following photo:
http://www.hkdigit.net/pic/press/hkdigit-20110919-074308.jpg.htm
before change the image size to 800 (i.e. 640 px), the image cache URL is
http://www.hkdigit.net/pic/cache/press/hkdigit-20110919-074308_640.jpg
After change to 800 px, the URL changed to
http://www.hkdigit.net/pic/cache/press/hkdigit-20110919-074308_800.jpg
How to prevent it happen, or only cache the full size image,as I always resize before upload.
Many thanks in advance.
Regards,
Chris Lee
Why do you wish to prevent this from happening? Those are two DIFFERENT images, at least in size. If you use just one name then at least one of them will not display correctly.
I guess I really do not understand your statement that you always resize before upload. You cannot either resize a single image to both those sizes.
It has been discussed before, but here it is again. Zenphoto will always create a cache version of your image in the sizes you use. That happens exactly once for each image/size. There is a simple test to see if the image is already cached.
To use the image you uploaded instead of the cache image would require a test of a fairly complex set of conditions: Is the size correct? Is there a watermark? Etc. Such tests would have to be done for each reference. The overhead of these tests simply is not warranted.
Dear sbillard,
First thanks for your reply. As I want the system allow show full size image, so I usually resize the image to meet the theme layout.
For example, if the theme design to show full image (max 640 px), I will resize the image on photoshop to 640px x 480px, so I don't need zenphoto to resize for me (for better quality reason). However zenphoto always append suffix _640 after the filename on cache image. What I want is zenphoto does not add the suffix.
i.e.
http://www.hkdigit.net/pic/press/hkdigit-20110919-074308.jpg.htm
Cache file is
http://www.hkdigit.net/pic/cache/press/hkdigit-20110919-074308.jpg (
Dear sbillard,
According the following URL:
http://www.zenphoto.org/news/troubleshooting-guide
Q: Why are images of the correct size still cached additionally?
A: "If you want no processiong/caching you need to modify your theme's image.php to use the full image directly."
Any hint how to code image.php to show full image directly?
Here is my existing coding:
[b]
" title="">
[/b]
Many thanks in advance.
Regards,
Chris Lee
We have really lots of forum post how to get the fullimage. You even just have to look at the official themes which nearly all have a link to the full image itself.
THere is also a theming tutorial and a functions documentation.
PS: If you like us to view code please escape it correctly. Your example is not readable at all.