Back

Why does the storage preview endpoint flip the image ? Is this a bug ?? Appwrite 1.5.10

  • 0
  • Web
Vineet
31 Aug, 2024, 01:59
TypeScript
export function imageLoader({ src, width, quality }: ImageLoaderProps) {
    const PROJECT_ID = process.env.NEXT_PUBLIC_PROJECT_ID as string
    const URL_ENDPOINT = process.env.NEXT_PUBLIC_APPWRITE_ENDPOINT as string
    const BUCKET_ID = process.env.NEXT_PUBLIC_MEDIA_BUCKET_ID as string
    return `${URL_ENDPOINT}/storage/buckets/${BUCKET_ID}/files/${src}/preview?project=${PROJECT_ID}&width=${width}&quality=${
        quality || 75
    }&output=webp`
}

The image returned is flipped. The behavior of this enpoint is erratic. Some images are rotated to left, some screenshots show with proper aspect ratio

Versions appwrite 1.5.10 self hosted in a dev env "appwrite": "^15.0.0",

TL;DR
Issue: The storage preview endpoint is flipping the image and displaying it inconsistently. Works fine with the view endpoint. Solution: Update to appwrite version 1.5.10.
Vineet
31 Aug, 2024, 01:59

This works fine with the view endpoint though

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