Forum
Any way to regenerate thumbnails?
A client uploaded a bunch of images but told me non had thumbnails in the asset screen. I discovered it was because neither imagick or gd were installed when the server was switched to php7. I've now installed these libraries, but wish to retrospectively generate thumbnails for any images without them. Is this doable?
It might be worth mentioning that there are lots of images, uploaded pre php upgrade, that do have thumbnails.
I'm happy to look into creating an app or similar if u need to. Find assets without thumbnails and generate. How might I go about this?
Thanks!
Are the images used in content regions?
They are being used in a
perch_content_custom()
field at the moment. There's no matchingperch_content()
region. I must have created the region withperch_content()
then changed it. I did try the republish option but no dice.Code currently looks like this:
Diagnostics:
If using them in content isn't causing the thumbnail to be generated, then it may be the case that the thumbnail won't be regenerated unless the image is reuploaded.
Yes, it turns out this was the case. What is interesting is that it seems that Imagick wasn't creating thumbnails when installed alone. When I installed GD too then image thumbnails were created (on upload). Is this expected? Or should Imagick be creating thumbnails too?
That's not expected, unless you'd explicitly configured the site to use GD instead of Imagick.
Imagick actually creates more thumbnails than GD can - it will usually thumbnail PDFs and video too.
That's not expected, unless you'd explicitly configured the site to use GD instead of Imagick.
Imagick actually creates more thumbnails than GD can - it will usually thumbnail PDFs and video too.
Hmm, odd. I don't know if it's worth trying to debug that. I've got image thumbnails now that I've installed GD too. It's probably a quirk of my server configuration or something specific to my server.