kamsar/Dianoga

Images always uploaded to MediaLibrary as non-optimized

Closed this issue · 3 comments

Version of Dianoga
5.2

Environment description
Sitecore 10 update 1

What configs you have enabled
Dianoga.DisableForSites.config
Dianoga.Jpeg.config
Dianoga.Png.config
Dianoga.Strategy.GetMediaStreamSync.config

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

  1. Upload PNG non-optimized image to MediaLibrary
  2. Check Sitecore logs for errors (i.e. Dianoga: ...)

Expected result
The image is uploaded as optimized. Can find in logs proofs of optimization: "Dianoga optimize: ..."

What I noticed
The image is uploaded as non-optimized. The error:
[timestamp] [1736 thread] Sitecore.Diagnostics.DefaultLog.Info(:0)evel - Dianoga: [relative path to image] cannot be optimized due to media type or path exclusion)
is written to Sitecore logs.

Does Dianoga support Sitecore 10 update 1 or Sitecore 10.1? If no, when it is planned to release a new version that will support newer versions of Sitecore 10 (i.e. Update 1 or 10.1)?

P.s.: WebP automatic conversion is also not working due to the same error in Sitecore logs.

Thank you in advance.

Hi @TarassD
I think you might be misunderstanding how dianoga works. It will only optimise when an image is rendered on a site, not during upload or preview in media library.
Also, webp will only work if you review and enable the webp configs, please check the readme carefully before doing that.
Dianoga fully supports and is tested on Sitecore 10.0.0 and 10.0.1 , I'm not aware of any issues with 10.1.0 yet although I haven't tested it.

@markgibbons25 my situation is similar to issue #84 with only difference that each time I try to upload/preview an image in Medialibrary, Dianoga MediaLibraryHandler is triggered and at specific step it aborts execution of pipeline and report an error in log:
[timestamp] [1736 thread] Sitecore.Diagnostics.DefaultLog.Info(:0)evel - Dianoga: [relative path to image] cannot be optimized due to media type or path exclusion)
Can you please explain why Dianoga reports errors when I try to upload or preview image in Sitecore MediaLibrary? And second question - should it generate image in WebP if I will have WebP config enabled?

@TarassD this isn't a good place for asking for help in configuring the module - please use https://sitecore.chat/ and you can get some better replies :)