VineetOriginal post
Rank 2: Process
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",
Summary
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.