Skip to main content

Posts

Showing posts from September, 2021

Using Dianoga's async image optimization on CDN

Dianoga is an automatic image optimizer for the Sitecore media library. It reduces the size of your images served from Sitecore by 8-70% automatically.  Dianoga is great for situations where content editors may not be image editing experts. How Dianoga works? By default, Dianoga runs asynchronously after the image is saved into the media cache. This means it has practically no effect on the site's frontend performance (though it does use some CPU time in the background). Dianoga updates the cache after the first image request. This means the first hit to images will serve the unoptimized version of image. Subsequent requests will receive the optimized version from cache. Where is the problem? Dianoga's behavior of serving unoptimized images on first request creates problem while using CDNs. CDNs cache the responses of media requests. Since first hit to images serve unoptimized image, CDN will cache the unoptimized version. CDN will serve this unoptimized version of image in it