0

Getting the below error in Dianoga logs.

The version used is 5.4.1 -
ERROR Dianoga: Could not resize image as it was larger than the maximum size allowed for memory processing

Also, the load time of the image in the site is huge (~44.2MB and 11.2 seconds) Has anyone faced a similar issue and tried resolving it?

2 Answers 2

1

The error you are getting is because the file size is greater than the Media.MaxSizerInMemory default setting.

This is set in your Sitecore.config like this:

<!--  MEDIA - MAX SIZE IN MEMORY
        The maximum size of media to load into memory for processing (resizing etc.).
        Default value: 40MB
  -->
<setting name="Media.MaxSizeInMemory" value="40MB" />

You could patch that setting to increase the max value. But you would need to be careful with the consequences of doing that. It could cause more resources to be consumed.

I would question why an editor is loading in a 44mb image file. Ideally something like Dianoga should only be used to further optimize images for Sitecore, it should not be the only optimization. Images should be saved and made ready for the web before being uploaded into Sitecore. Depending on the image type, its unlikely that Dianoga is going to be able to compress a 44mb image to something acceptable for a web page.

2
  • Thanks for your reply! I will check the settings in the config file.
    – Swathi
    May 10 at 5:06
  • I checked the settings in the config file and its the same 40MB. The original image size is around 27MB but the optimized image is ~42MB.
    – Swathi
    May 10 at 15:06
0

Agree with @richard, if you need more customization and need to dive deep, you can refer article: https://bartlomiejmucha.com/en/blog/how-to-resize-and-compress-images-with-dianoga-during-upload-to-sitecore-media-library/

Also the load time is high due to image size, try to see these details with normal size image and you can cross check image size in Media Cache folder, where dianoga keeps image after optimization.

1
  • Thanks for your suggestions. I will compare the image size and also check the Media cache folder.
    – Swathi
    May 10 at 5:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.