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

amp-img: short circuit webp fallback for iOS #18599

Closed
aghassemi opened this issue Oct 8, 2018 · 3 comments
Closed

amp-img: short circuit webp fallback for iOS #18599

aghassemi opened this issue Oct 8, 2018 · 3 comments

Comments

@aghassemi
Copy link
Contributor

if src of an amp-img points to a .webp file, we should be able to short circuit to fallback immediately without waiting for img load to fail. This will remove one extra download in iOS case.

There will be cases where file extension is not present which this won't support. Also supporting srcset requires parsing and even in that case a mixed srcset will not work so skipping srcset all together for this.

There is a small chance some files with .webp extension are not actually .webp and may return some other format (maybe depending on requester) and rely on browser content-sniffing to get around the discrepancy. I think this is acceptable but we should put the new behaviour behind an experiment first just in case.

@Gregable
Copy link
Member

Gregable commented Oct 8, 2018

There is a related old issue for this: #3517

@ampprojectbot
Copy link
Member

This issue hasn't been updated in awhile. @aghassemi Do you have any updates?

@aghassemi
Copy link
Contributor Author

since cache server-side detects support and responds with webp (even for .jpg extension), I don't think this is something we want to do. Documenting the server-side solution (#21912) is the right way to go.

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

No branches or pull requests

3 participants