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

[feature-request] Add webp polyfill #333

Closed
ghost opened this issue Jul 13, 2019 · 2 comments
Closed

[feature-request] Add webp polyfill #333

ghost opened this issue Jul 13, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 13, 2019

What

It would be cool if you could include a webp polyfill in your service (maybe webp-hero).

Details

I regularly use WebP to reduce my file size, but I also have to support IE11 which does not support this format. And because I really like your service and use it for other polyfills too it would be great if you could integrate one for WebP.

Additional information

WebP is an image format employing both lossy and lossless compression. It is currently developed by Google, based on technology acquired with the purchase of On2 Technologies.

@sjparkinson
Copy link

Browser polyfill for the webp image format.

  • webp images come alive, even in safari and ie11! (firefox and edge now support webp)
  • webp-hero actually runs google's libwebp decoder in the browser — it converts webp images to png's on-the-fly
  • webp-hero's polyfill functionality renders decoded image data to a hidden canvas, and converts that to a png data url which is then displayed to the user

https://github.com/chase-moskal/webp-hero

@JakeChampion
Copy link
Owner

Hi, I don't think we will add a polyfill for webp, it is a very large polyfill and only works in some scenarios (does not work for webp images used in CSS). I would recommend using the srcset attribute on an IMG tag and serving PNG or jpeg to browsers which don't have webp support

@JakeChampion JakeChampion transferred this issue from polyfillpolyfill/polyfill-service Nov 21, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants