satori
satori copied to clipboard
Support webp images
Feature Request
Allow webp images to be rendered
It’s very likely that we will not implement this feature. For static images, you can convert its type manually; for images from a CDN (e.g. Cloudinary or Unsplash), usually you can specify the format via a parameter.
You can also use Next.js Image Optimization. Something like:
https://example.com/_next/image?url=%2Fapi%2Fog&w=1920&q=75
Update: you can use import { getImageProps } from 'next/image'
to generate this string
Hi ! @shuding
I took time during week to try to handle webp image format in satori directly. Probably faced the issue you faced with the file format decoding.
I figured out the only this that I needed to decode was the image width and height. Am I wrong ? Could we get it from the EXIF metadatas ?
This limitation should at least be doc'd. Is there a list of supported image types somewhere?