Jump to content
bernhard

width or height exceeds limit in OpenPixelCache/3911

Recommended Posts

When uploading a large image (16667x5000) I get this error:

Quote

width or height exceeds limit `.../site/assets/cache/WireTempDir/.PFM0.87481800T1615895885RN5Ct513qCVbti/0/zeitung_inserat_jpg_ac_adrian_cirita_fruehl_2021.0x260.jpg' @ error/cache.c/OpenPixelCache/3911

QNB8Ii3.png

This happens after the 7MB image is uploaded. I'm using ImageSizerImagick and have 512MB memory setting. I have tried to set client side resizing to max 1920x1920 but then it gets stuck before upload.

Has anybody of you ever experienced something similar? Any ideas how to solve that? Manually resizing the Image before upload is of course a solution, but not the best one...

Maybe @horst ?

Share this post


Link to post
Share on other sites

Are there actual width or height limits (usually given in KP) in policy.xml that your image might hit?

  • Like 1

Share this post


Link to post
Share on other sites
2 minutes ago, BitPoet said:

(usually given in KP) in policy.xml

Thx BitPoet for joining 🙂 I have no idea what you are talking about - it's totally possible that I'm missing something obvious 🙂 

Share this post


Link to post
Share on other sites

Image Magick has a policy.xml file somewhere in /etc where its default limits are configured - usually quite permissive, but different distributions may ship their own limits for maximum image width / height, memory limit, map (disk cache) limit etc. as explained here https://www.imagemagick.org/script/security-policy.php. I have no idea if/how these policies are honored when called from PHP, but it might be worth taking a look.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

There have been some stricter settings in general in the policy.xml in recent versions of Imagemagick, some to protect against ghostscript vulnerabilities (https://askubuntu.com/questions/1127260/imagemagick-convert-not-allowed) so it's probably a good time to get familiar with policy.xml (https://imagemagick.org/script/security-policy.php), although I must admit I have starting using command line tools for PDF stuff lately, eg: pdftoppm and pdfinfo - sorry, getting OT.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...