Back

Image upload, and request on transformation if it was webp...

  • 0
  • Web
Camo
29 May, 2023, 15:22

Sharp has avif support as well

TL;DR
User wants to enable webp image uploads and previews on an input field. They mention using the imagemagick-dev package and include links to relevant code files. They encounter an issue with webp previews not showing and suggest a bug, while also providing potential solutions. Another user suggests using the `output` parameter and provides a link for reference. The conversation then veers towards using the bucket transformation function and custom functions in Appwrite. The suggestion of using sharp is made, but it is clarified that it is not compatible with Appwrite's PHP code base. The user notes that sharp also supports avif. No solution is mentioned in the
Camo
29 May, 2023, 15:23

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

Bouahaza
29 May, 2023, 15:23

Appwrite use php, sharp is only compatible with nodejs

Camo
29 May, 2023, 15:24

doesn't appwrite use dockered functions as well?

Camo
29 May, 2023, 15:24

so why not just add sharp in the mix

Bouahaza
29 May, 2023, 15:24

Cause all code base is on php

Bouahaza
29 May, 2023, 15:25

btw, you should be able to use sharp on custom function 🙂

Camo
29 May, 2023, 15:25

i have no idea how i would add that to the on demand functionality

Bouahaza
29 May, 2023, 15:26
Camo
29 May, 2023, 15:26

i was refering to the bucket transformation function that is built in

Camo
29 May, 2023, 15:29

Anyway, from googling, it seems imagick does support webp, and transformations on it

Bouahaza
29 May, 2023, 15:30
Bouahaza
29 May, 2023, 15:31

output param

Camo
29 May, 2023, 15:31

but why no previews for webp, as it seems to be supporting it

Camo
29 May, 2023, 15:31

webp -> webp

Drake
29 May, 2023, 15:31
Camo
29 May, 2023, 15:32

nice catch

Bouahaza
29 May, 2023, 15:32

No here is for input

Bouahaza
29 May, 2023, 15:32

Oh not see that it's what you want 😄

Camo
29 May, 2023, 15:33

I was uploading webp 4000x4000, then requesting webp 400x400, wasn't getting preview, that was my concern

Bouahaza
29 May, 2023, 15:37

Thinks need to update https://github.com/appwrite/docker-base/blob/main/Dockerfile with webp metatypes for that ?

Drake
29 May, 2023, 15:48
Bouahaza
29 May, 2023, 15:59

Is imagemagick-dev package include webp lib ?

Bouahaza
29 May, 2023, 16:04

While it can export to webp, we'll say yes. So true, need to allow webp on input field

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more