#Image upload, and request on transformation if it was webp...
28 messages · Page 1 of 1 (latest)
Appwrite users imagick
Interesting, it's more heavy and slower than Sharp which is almost a standard now..
In general, Sharp is known to be faster and more lightweight than Imagick. This is because it uses libvips, a fast and efficient image processing library, and it is designed to minimize memory usage by processing images in chunks.
Imagick, on the other hand, is a PHP extension that was ported to Node.js, so it has more overhead and can be slower and more memory-intensive than Sharp.
Sharp has avif support as well
Anyway, just wanted to point it out, as I encountered this few days ago, once i get done with everything else, will try to think how to come around the error, while we have a fix
Appwrite use php, sharp is only compatible with nodejs
doesn't appwrite use dockered functions as well?
so why not just add sharp in the mix
Cause all code base is on php
btw, you should be able to use sharp on custom function 🙂
i have no idea how i would add that to the on demand functionality
i was refering to the bucket transformation function that is built in
Anyway, from googling, it seems imagick does support webp, and transformations on it
Yes you can, read here : https://appwrite.io/docs/client/storage?sdk=web-default#storageGetFilePreview
output param
i think it's a bug. i think it's missing from here: https://github.com/appwrite/appwrite/blob/f45905e5456fb0722751b10887e5a488fa3545b8/app/config/storage/inputs.php
nice catch
I was uploading webp 4000x4000, then requesting webp 400x400, wasn't getting preview, that was my concern
Thinks need to update https://github.com/appwrite/docker-base/blob/main/Dockerfile with webp metatypes for that ?
This checks that the input type is one of the allowed ones for preview. See https://github.com/appwrite/appwrite/blob/f45905e5456fb0722751b10887e5a488fa3545b8/app/controllers/api/storage.php#L872
Is imagemagick-dev package include webp lib ?