Created
August 8, 2018 16:37
-
-
Save stevepentler/c8048dd8e65b96317cbba4e601682546 to your computer and use it in GitHub Desktop.
Image Compresssion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A. GIF doubled in size for standard image, 6.7KB => 13.2 | |
- fully supported | |
- no gains for standard images without significant blocks of color | |
B. WebP was reliably 2/3 original size. 26.3KB => 17.8 | |
- only works in Chrome/Opera, Firefox is considering support but I wouldn't count on it | |
- would require backfilling webp data (but for large/trafficked orgs this could be worthwile) | |
- JS side - detect chrome/opera, change AWS extension to .webp | |
- Save on AWS feeds, speed up lazy loading and UX considerably | |
- Couldn't find a functional polyfill for unsupported browsers (webp-hero package) | |
- Don't want conditional responses (one persion receives one extension, another a different extension) from the API, so would prefer to keep on front end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment