kamsar / Dianoga

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

WebP possible with .ashx extensions disabled? #97

Closed mattcdowning closed 3 years ago

mattcdowning commented 3 years ago

Version of Dianoga

5.4.0

Environment description

Sitecore 9.1.0 .NET Framework 4.7.1

What configs you have enabled

Dianoga.Jpeg.config Dianoga.Png.config Dianoga.Strategy.MediaCacheAsync.config Dianoga.Log.config Dianoga.WebP.config

Reproducible steps (1... 2... 3...) that cause the issue

What you expected to see, versus what you actually saw

I've enabled WebP support per instructions in web.config: <add verb="*" path="sitecore_media.ashx" type="Dianoga.MediaRequestHandler, Dianoga" name="Sitecore.MediaRequestHandler" />

Dianoga is successfully compressing images but not converting them to WebP format....should this conversion work even though I have .ashx extension disabled on media urls?

markgibbons25 commented 3 years ago

Yes it should be working, I have tested with

mattcdowning commented 3 years ago

@markgibbons25 Thanks so much for confirming! I finally got it working by going to the Properties of the file, Dianoga.WebP.config, in Visual Studio and changing Build Action from None to Content per this article: https://www.vinayjadav.com/posts/webp-for-sitecore-with-dianoga 🎉🎉🎉