bernhard Posted March 16, 2021 Share Posted March 16, 2021 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 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 ? Link to comment Share on other sites More sharing options...
BitPoet Posted March 16, 2021 Share Posted March 16, 2021 Are there actual width or height limits (usually given in KP) in policy.xml that your image might hit? 1 Link to comment Share on other sites More sharing options...
bernhard Posted March 16, 2021 Author Share Posted March 16, 2021 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 ? Link to comment Share on other sites More sharing options...
BitPoet Posted March 16, 2021 Share Posted March 16, 2021 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. 1 1 Link to comment Share on other sites More sharing options...
Pixrael Posted March 16, 2021 Share Posted March 16, 2021 @bernhard several days ago I found this free image cache & resize service https://images.weserv.nl/ just in case you want to create a Rock module for that ? 2 Link to comment Share on other sites More sharing options...
adrian Posted March 17, 2021 Share Posted March 17, 2021 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now