Hello @h2non! Thanks so much for writing Imaginary! I'm using Imaginary for loading front-end images with Next.js's image optimizer, and it's working great.
One feature I'd like to port over from Next.js's default image processor is the ability for the server to dynamically pick the output format for images based on the accept header ([docs]()). For example, in Chrome, Next.js sends the following header when you use an <img> tag:
By default, you can configure Next.js to "prefer" certain formats, like webp, and the server will automatically convert the output image to the first preferred format the browser supports. You can find those docs here.
Given Imaginary already supports a type argument for converting the output format, I imagine this would be fairly simple to implement. I'm happy to open a PR to do so, but wanted to gauge your interest first.
Hello @h2non! Thanks so much for writing Imaginary! I'm using Imaginary for loading front-end images with Next.js's image optimizer, and it's working great.
One feature I'd like to port over from Next.js's default image processor is the ability for the server to dynamically pick the output format for images based on the
accept
header ([docs]()). For example, in Chrome, Next.js sends the following header when you use an<img>
tag:By default, you can configure Next.js to "prefer" certain formats, like webp, and the server will automatically convert the output image to the first preferred format the browser supports. You can find those docs here.
Given Imaginary already supports a
type
argument for converting the output format, I imagine this would be fairly simple to implement. I'm happy to open a PR to do so, but wanted to gauge your interest first.