New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support webP transform with the image proxy transform API #2508
Comments
Automatic conversion between different formats is something we probably don't want to do but we could add a |
I have been investigating this exact idea @dohomi over the past week. Thank you for creating this post. I would also like the ability to request a specific file type from nhost. It looks like nhost uses sharp package which already supports this feature. The search param I was also considering doing the conversion to webp when the image is uploaded so storage only has webp images in it thus cutting down on the storage usage and request image transformation execute time. |
We don't use sharp (wrong programming language :P) but it doesn't matter, the library we use is also built on top of libvips and has support for this. If someone wants to contribute this feature that'd be great, happy to help guiding. Otherwise we will get to this when we can. |
I guess the best would be something like a |
Optimize would mean different things for different people so I think being explicit is the best path forward. Also, the backend has no access to browser information so it'd be impossible to know what's supported and what's not. |
To clarify @dohomi, are you suggesting that if I grabbed this request header example from my browser:
|
@jovermier yes I think any path, either I would assume that the image proxy should have access to the browser |
Is your feature request related to a problem? Please describe.
Returning webP for JPG, PNG and other file format would significantly reduce the file size and accelerate the CDN API by lowering the transferred data size.
Describe the solution you'd like
It would be great if images be optimised when
q=70
or a different query param is been used.Additional context
WebP is supported by the 96% of browsers based on
https://caniuse.com/webp
The text was updated successfully, but these errors were encountered: