Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Creating image thumbs from animated webp
Can we do this in 4.9.0-dev? It doesn’t work for me, but it might just be the files I’m using to test.
Txp will generate a thumb (well, a static thumb at least) from an animated gif, but not an animated webp as far as I can make out.
Any ideas?
(smd_thumbnail doesn’t do it either, probably because the core lib/class.thumb.php doesn’t support it)
Last edited by Bloke (2025-06-01 22:12:33)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Creating image thumbs from animated webp
Open image in favourite image editor and resize to required/ desired size and then upload?
(I’ve never worked with animated webp files, I have no idea how well or poorly those things resize)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: Creating image thumbs from animated webp
phiw13 wrote #339758:
Open image in favourite image editor and resize to required/ desired size and then upload?
Yes I could get the client to do that. And then he’d have to create the animated version at each size point, then upload each different size to the various thumbnails in my plugin. Bit of a bind though. Hmmm.
I’ve also tried doing it with Files but that adds another layer: how to link it to the article to which it belongs. And it still needs a thumbnail. So I abandoned that approach.
But no matter what I did, the animated webp just refused to display on the site. I think smd_thumbnail wasn’t helping and I fixed a bug last night. Even so, it won’t create thumbs from an animated original file upload and (of course) it won’t create an animated thumbnail.
Last edited by Bloke (2025-06-02 13:19:20)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Creating image thumbs from animated webp
According to php.net, the standard imagecreatefromwebp function cannot read animated webp images. It seems that Imagemagick might be able to, though.
You could use jcr_image_custom to link to a file from your thumb but it is still extra steps as you say.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Creating image thumbs from animated webp
Ah, okay, that explains the lack of thumbnail creation then! Thanks for the info. I’ll have to think about this… the animated GIFs are too huge and would need massively optimizing.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Creating image thumbs from animated webp
Does anybody have experience with those 3D product rotating JavaScript things? That might be a better option If he can take the requisite images to feed into it.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Creating image thumbs from animated webp
Bloke wrote #339773:
Yes I could get the client to do that. And then he’d have to create the animated version at each size point, then upload each different size to the various thumbnails in my plugin. Bit of a bind though. Hmmm.
yeah… I’ve had that problem with transparent PNG files, the thumbnail generation was cr*p. Manually generating them in an image editor and uploading one by one. Not great.
[…] I think smd_thumbnail wasn’t helping and I fixed a bug last night.
I saw that, that one (I closed the issue now)
No idea about the animated webp not displaying – they all should though. Does the browser console reports anything? (and depending on browser settings, the animation might not show until the user allows it (e.g. Safari, Context menu > Play animation).
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: Creating image thumbs from animated webp
phiw13 wrote #339781:
No idea about the animated webp not displaying
Idiot rookie mistake on my part. My form was using smd_thumbnail to view the smaller version which, of course as Julian noted above, never got created because GD doesn’t support it, and also because of the bug you spotted about a year ago and I fixed yesterday 🙄 which made it bomb out when trying to replace the thumbnail by hand.
If I now manually upload a thumb, it shows up and animates.
But the file size is too big to be of use, so I’m going to try and investigate the interactive product rotator thingies instead.
Just gotta try and find a lightweight one…
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline