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

Add support for webp images as a valid image Asset type #1545

Closed
khalwat opened this issue Mar 17, 2017 · 3 comments
Closed

Add support for webp images as a valid image Asset type #1545

khalwat opened this issue Mar 17, 2017 · 3 comments
Assignees
Labels
enhancement improvements to existing features

Comments

@khalwat
Copy link
Contributor

khalwat commented Mar 17, 2017

webp is a really nice image format that has the weight of Google behind it; and it delivers really nice optimization of images in terms of file size.

While not all browsers support it yet, leaving it up to the developer to decide if it should be allowed would be useful. Here are some webp images from Google for a comparison:

https://developers.google.com/speed/webp/gallery1

Additionally, what many websites are doing is having the webserver itself handle the delivery of webp images based on the Accept header:

Nginx: https://github.com/uhop/grunt-tight-sprite/wiki/Recipe:-serve-WebP-with-nginx-conditionally

Apache: https://gist.github.com/seeekr/2415528

YouTube and other major sites do this; if you visit their site using Chrome, you get webp images. If you visit their site using a browser that doesn't support them, you get jpg or png

As long as Craft supports webp as an allowable image type, we'd be able to deliver this functionality in, even automatically pre-created the webp versions of the images if #1544 is implemented.

@khalwat
Copy link
Contributor Author

khalwat commented Mar 22, 2017

aelvan/Imager-Craft#90

@khalwat
Copy link
Contributor Author

khalwat commented Mar 27, 2017

@andris-sevcenko
Copy link
Contributor

andris-sevcenko commented May 4, 2017

Improved the support for this with e4ba1e3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improvements to existing features
Projects
None yet
Development

No branches or pull requests

3 participants