kamsar / Dianoga

An automatic image optimizer for the Sitecore media library.
Other
104 stars 45 forks source link

WebP not working on any CDN #61

Closed markgibbons25 closed 4 years ago

markgibbons25 commented 4 years ago

This is because various CDN either don't pass the "Accept" header, or because they don't honour the "Vary: Accept" header.

A potential workaround is to have a unique query string parameter for image types and browsers that support WebP.

markgibbons25 commented 4 years ago

I've experimented with having a unique query string parameter for image types and browsers that support WebP, but this falls flat with the HTML cache. Experimenting now with adding a cache key for this.

markgibbons25 commented 4 years ago

In SXA, requests to the sxa/search/results api doesnt pass image/webp in accept types header.

jeroendegroot commented 2 years ago

Just found this after asking this question on SSE which I think might be related to this change. Are you able to explain what was changed as part of this fix, and can you opt out of it if your CDN supports "Accept" header? Thanks for all the great work on Dianoga this is making such a significant performance improvement!