Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi there,
I am redesigning my old website and need to change the thumbnail sizes.

Is there a way to batch resizing all thumbnails once the width and height settings have been changed?

I mean without going page by page to resize them manually?
I have kind of 1000 entries... that will take time!

width='260'
height='125'
Hi, Couch doesn't store detailed information about thumbnails in database. For a random image with a thumbnail 150x150 a database entry would look like "random_001-150x150.jpg" So, it means that the solution must make sure that Couch can actually find the thumb by its stored path & name. This leads to 2 solutions:

1. Batch-process all physical thumbnails on hdd with some image software( I would use http://www.faststone.org/FSViewerDetail.htm for it ) to resize them IF currently thumbs are bigger (for quality reasons) than what you want them to be. Keeping the same name is essential. And make the change to template to paste new size there, so Couch updates it for any future uploaded images. This solution takes little time but is a 'hacky'.

2. Recreate all thumbnails from images via some script. Downside is time to learn, understand and implement it thoughtfully. Check this out - viewtopic.php?f=8&t=9707&p=21775&hilit=recreate+thumbnail#p21780 The basic idea is to have script to do this in steps.
Couch will recreate all thumbnails associated with an image only when it senses that the main image itself has changed.

So, as a test, if we set the main image as blank, save, set the image back to the original image and save a second time you'll see that the thumbnail will get created.


Have fun :)
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Cool!

Thanks trendoman,
the number 2 will do perfectly...

Cheers
3 posts Page 1 of 1