Rank 3: Container
Sharp has avif support as well
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 3: Container
Sharp has avif support as well
Rank 3: Container
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
Rank 4: Virtual Machine
Appwrite use php, sharp is only compatible with nodejs
Rank 3: Container
doesn't appwrite use dockered functions as well?
Rank 3: Container
so why not just add sharp in the mix
Rank 4: Virtual Machine
Cause all code base is on php
Rank 4: Virtual Machine
btw, you should be able to use sharp on custom function 🙂
Rank 3: Container
i have no idea how i would add that to the on demand functionality
Rank 4: Virtual Machine
Rank 3: Container
i was refering to the bucket transformation function that is built in
Rank 3: Container
Anyway, from googling, it seems imagick does support webp, and transformations on it
Rank 4: Virtual Machine
Rank 4: Virtual Machine
Yes you can, read here : https://appwrite.io/docs/client/storage?sdk=web-default#storageGetFilePreview
Rank 4: Virtual Machine
output param
Rank 3: Container
but why no previews for webp, as it seems to be supporting it
Rank 3: Container
webp -> webp
Admin
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
Rank 3: Container
nice catch
Rank 4: Virtual Machine
No here is for input
Rank 4: Virtual Machine
Oh not see that it's what you want 😄
Rank 3: Container
I was uploading webp 4000x4000, then requesting webp 400x400, wasn't getting preview, that was my concern
Rank 4: Virtual Machine
Thinks need to update https://github.com/appwrite/docker-base/blob/main/Dockerfile with webp metatypes for that ?
Admin
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
Rank 4: Virtual Machine
Is imagemagick-dev package include webp lib ?
Rank 4: Virtual Machine
While it can export to webp, we'll say yes. So true, need to allow webp on input field