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

Comments

Projects
None yet
3 participants
@khalwat
Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor Author

commented Mar 22, 2017

@khalwat

This comment has been minimized.

Copy link
Contributor Author

commented Mar 27, 2017

@andris-sevcenko

This comment has been minimized.

Copy link
Member

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
You can’t perform that action at this time.