Skip to content
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

enable content negotiation (e.g return Webp image if client supports webp) #521

Open
vincentsarago opened this issue Oct 11, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@vincentsarago
Copy link
Member

in

if not format:
format = ImageType.jpeg if data.mask.all() else ImageType.png

we return either a PNG or a JPEG based on the mask, but we could also return a Webp based on the request accept header value (see https://github.com/developmentseed/tifeatures/blob/6def23bc57b547fda06b718f493d4d20ec369a35/tifeatures/dependencies.py#L102-L114)

@vincentsarago vincentsarago added the enhancement New feature or request label Oct 28, 2022
@vincentsarago vincentsarago changed the title Return Webp image if client supports webp enable content negotiation (e.g return Webp image if client supports webp) Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant