I'm using a lot of thumbnails but never the original file. To save space, I'd like to prevent the original from being saved on disk but only keep a thumbnail of 100px. How can I do this?
Thanks, Dennis
|
I'm using a lot of thumbnails but never the original file. To save space, I'd like to prevent the original from being saved on disk but only keep a thumbnail of 100px. How can I do this? Thanks, Dennis |
|||||||||||||||
|
|
|||||||||
|
|
I foud another solution in the web. It's based on the one accepted here, but it takes it even further. The one, accepted here, removes the main-image and goes on. The solution I found replaces the original image by the image generated for "large". It just goes on without replacing if this image-resolution is not defined. This way it is ensured that every script, relying on the original image, will still work as before - for example the thumnail regeneration. http://www.wprecipes.com/how-to-automatically-use-resized-image-instead-of-originals EDIT: @dalbaeb pointed me to an issue written in the comments on the blog-post. I rewrote the code based on the API instead of the solution provided there. It's not that much of a difference, but just to use the same function calls as in the API ;)
EDIT2: I had a problem with the code on one client where another size-configuration linked to the large-file. I updated the code accordingly. If you have any kind of problems with it, drop me a mail. |
|||||||
|