Version of Dianoga 5.4.1
Environment description Sitecore.NET 9.3.0 .NET Framework 4.7.2
What configs you have enabled
- Dianoga.DisableForSites.config
- Dianoga.Jpeg.config
- Dianoga.Log.config
- Dianoga.Png.config
- Dianoga.Svg.config
- Dianoga.WebP.CDN.config
- Dianoga.WebP.config
Web.config changes: I`ve replaced in sitecore_media.ashx type to "Dianoga.MediaRequestHandler, Dianoga" name="Sitecore.MediaRequestHandler"
What you expected to see, versus what you actually saw
Expected: To see images being pulled down in webp format
Actual: Images are received in original formats (jpeg, png, etc), but not in webp.
Logs files: All logs files are empty.
Comments After deploy on CD in Azure MediaProvider adds extension webp as a URL param. This should trigger the webp optimizer in the MediaRequestHandler. But the MediaProvider doesn’t appear to run. On my local envirement I don`t use CDN and Dianoga works fine. And I am probably missing something?
• Your image files are not getting converted because there might be a
conflict in the Sync/Async strategy. Also, since the ‘Dianoga.WebP.CDN.config’ configuration in the CDN is enabled, you will have to disable the ‘Dianoga.Strategy.MediaCacheAsync.config’ setting.Also, ensure that ‘MediaOptimization’ is enabled by enabling the ‘Dianoga.Strategy.GetMediaStreamSync.config.disabled’ config setting and the one stated above. This will ensure that the
optimization will occur synchronously when the images are requested, thus ensuring the successful conversion of image files.• Please check the ‘Accept’ header configured in the CDN to be included in the cache key as the list of accepted media formats is mentioned in this header. This header tells which image format conversions are possible. For e.g.: -
the header can be ‘image/avif,image/webp,image/apng,image/*,*/*;q=0.8’ which means that the browser supports ‘WebP’ image format.Also, as stated by you in the question, you seem to have enabled the
‘Next-gen formats support’, but in that too, you will have to change the line ‘’ to ‘’ in the web.config file.For more details, kindly refer to the below documentation link for more steps to be followed regarding this: -
https://github.com/kamsar/Dianoga#optimization-strategies