0

As part of a Sitecore upgrade to v10 we also upgraded to Dianoga V5.4.1. This site uses output/HTML cache extensively. We need to support browsers with and without webp support. The WebP CDN config mentions this:

<!-- Generate a unique HTML cache key for renderings since the links will have query string extension=webp -->

This seems to happen correctly i.e. if a browser supports webp the extension=webp querystring is added and otherwise it is not. The issue I'm running into is that these URLs are part of renderings which get cached in the output cache and are not always correct when returned from cache, e.g. initially a rendering was requested and cached by a browser which does not support webp, and then it gets returned to a browser with webp support.

Prior to this upgrade Dianoga did not add this extension, and returned correct webp/original image based on the browsers accept request header (the CDN is configured to use this for unique cache key). This there a way in Dianoga v5 to get the same behavior, or is there a different configuration to make this work?

1 Answer 1

0

Make sure that Dianoga.WebP.CDN.config is enabled and the GenerateCacheKey processor is loading in the correct order and not conflicting with any custom cache config you might have.

1
  • My custom cache key processor was conflicting with the Dianoga WebP one, thanks for pointing this out!
    – Jeroen
    Commented Dec 13, 2021 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.