Skip to content

WEBP images preview not working in 1.8.0 #10699

Closed

Description

@tawfeks

👟 Reproduction steps

  1. Upload an webp image via console or any sdk
  2. Try to access it via /preview endpoint
  3. See the error:
    {"message":"no decode delegate for this image format `WEBP' @ error/blob.c/BlobToImage/481","code":400,"type":"storage_file_type_unsupported","version":"1.8.0"}

Also in storage console, the previews of webp images stopped from showing:
preview:1 GET ....long file url..... 400 (Bad Request)

👍 Expected behavior

It should work as before in 1.7.4. The images should be accessible via preview endpoint.

👎 Actual Behavior

It actually shows an error message

🎲 Appwrite version

Version 1.8.x

💻 Operating system

Linux

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Activity

  1. added theissue type on Oct 24, 2025
  2. changed the title [-]WEBP preview not working after upgrading to 1.8.0[/-] [+]WEBP images preview not working in 1.8.0[/+] on Oct 24, 2025
  3. self-assigned this
    on Oct 24, 2025
  4. added
    product / storage
    on Oct 24, 2025
  5. stnguyen90 commented on Oct 24, 2025

    @stnguyen90
    Contributor

    @tawfeks thanks for raising this issue! 🙏🏼 We'll look into this promptly.

    Related discord thread: https://discord.com/channels/564160730845151244/1431187289702268968

  6. tysoncung commented on Oct 25, 2025

    @tysoncung
  7. stnguyen90 commented on Oct 26, 2025

    @stnguyen90
    Contributor

    @tawfeks perhaps the order of installed packages is causing issues. As a workaround, you can reinstall imagemagick-dev by exec'ing into the appwrite container and running the following:

    apk del imagemagick-dev
    apk add imagemagick-dev
    
  8. usmandilmeer commented on Oct 26, 2025

    @usmandilmeer

    @stnguyen90 thank you, it really fixed the issue.

  9. usmandilmeer commented on Oct 27, 2025

    @usmandilmeer

    Fix WebP image preview issue in Appwrite:1.8.0

    Problem:
    The default Appwrite:1.8.0 container included outdated ImageMagick packages, not showing the WebP image previews

    username@ubuntu:~/appwrite$ docker exec -it appwrite sh
     /usr/src/code # apk info -v | grep imagemagick
     imagemagick-7.1.2.0-r0
     imagemagick-c++-7.1.2.0-r0
     imagemagick-dev-7.1.2.0-r0
     imagemagick-heic-7.1.2.0-r0
     imagemagick-jpeg-7.1.2.0-r0
     imagemagick-jxl-7.1.2.0-r0
     imagemagick-libs-7.1.2.0-r0
     imagemagick-openexr-7.1.2.0-r0
    
    

    Temporary workaround:
    Suggested by @stnguyen90, running inside the container:

    docker exec -it appwrite sh
    apk del imagemagick-dev
    apk add imagemagick-dev
    

    ⚠️ Note: This works only until the container is rebuilt or docker-compose down is executed. On newly built containers, the issue reappears.

    Permanent solution (applied to my production Appwrite instance on VPS):
    To ensure WebP previews work reliably in production, I applied the following solution:

    1. Clone my forked Appwrite repository with the WebP image preview fixed:
     git clone -b fix-webp-image-preview https://github.com/usmandilmeer/appwrite.git
    
    1. Build a new Docker image:
      docker build -t usmandilmeer/appwrite .
    
    1. Go to the appwrite main directory and Update docker-compose.yml to use the newly built image under the Appwrite service:
      services:
          appwrite:
              image: usmandilmeer/appwrite
    

    After this, enjoy the flow, WebP image previews work reliably even after docker-compose down and docker-compose up.

    New appwrite container running with my forked repo image and imagemagick versions after the fix:

    username@ubuntu:~/appwrite$ docker exec -it appwrite sh
    /usr/src/code # apk info -v | grep imagemagick
    imagemagick-7.1.2.3-r0
    imagemagick-c++-7.1.2.3-r0
    imagemagick-dev-7.1.2.3-r0
    imagemagick-heic-7.1.2.0-r0
    imagemagick-jpeg-7.1.2.3-r0
    imagemagick-jxl-7.1.2.3-r0
    imagemagick-libs-7.1.2.3-r0
    imagemagick-openexr-7.1.2.3-r0
    imagemagick-webp-7.1.2.3-r0
    
  10. tawfeks commented on Oct 27, 2025

    @tawfeks
    Author

    Thanks for your help guys

    It was an easy workaround and it worked! Very nice.

  11. added
    product / self-hosted
    on Oct 27, 2025
  12. linked a pull request that will close this issueFix webp upload and previews #10738on Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

product / self-hostedproduct / storage

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions