kamsar / Dianoga

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

PNG files aren't generated from webP images #72

Closed samjonescodehouse closed 4 years ago

samjonescodehouse commented 4 years ago

Version of Dianoga

5.0.1

Environment description

Sitecore 9.2

What configs you have enabled

Dianoga.config Dianoga.DisableForSites.config Dianoga.Jpeg.config Dianoga.Jpeg.Lossy.config Dianoga.Png.config Dianoga.Strategy.GetMediaStreamSync.config Dianoga.WebP.config

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

  1. Upload a webP image to sitecore
  2. Add the image to a new page in sitecore
  3. View the page in Internet Explorer
  4. No image is shown, but the IE developer tools network tab lists:
   Request URL: https://clarion.local/-/jssmedia/trees-webp.ashx?w=1100&h=auto&mw=1100
   content-disposition: inline; filename="trees-webp.webp"
   content-type: image/webp
   Status Code: 200 / 

The webP file renders correctly in Chrome.

What you expected to see, versus what you actually saw

Expected: Png image creation in App_Data\Media_Cache\ in cases where the browser doesn't support WebP such as when viewing an image for the first, or second time using Internet Explorer.

Actual: Png files aren't returned from the browser and no compatible formats are generated

Relevant logs

The readme states that "performance of Dianoga" will be logged to sitecore logs, but the only entries in sitecore logs is startup activity such as "d:\website\bin\dianoga.dll (Dianoga, Automatic media library image file optimization for Sitecore, 5.0.1)

markgibbons25 commented 4 years ago

Hi @samjonescodehouse, WebP to Png / Jpg conversion is not currently supported by Dianoga (but the reverse is supported). It looks like we could use the dwebp tool to add support for WebP to Png conversion, however I don't see any tool for WebP to Jpg conversion. I think that some WebP files would be very large when converted to Png so I'm not sure if this is a good feature to have, but would consider approving a merge request with it. Thanks for the feedback!

samjonescodehouse commented 4 years ago

Thanks