Joe Posted October 30, 2013 Share Posted October 30, 2013 Hi, I have a peculiar image resizing problem: I can upload a .jpg with a size of 5.54 MB and with the dimensions 2916 x 2112 no problem, resizing on server works fine. But an image with only 2.59 MB that has the dimensions 4000 x 3000 causes this error: Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 11520 bytes)(line 210 of /mycms/wire/core/ImageSizer.php) At first I thought the problem was caused by file size or by the extension being in capitals, but tested and the problem really seems to be the image dimensions. I wonder if it is a Processwire setting or an apache thing (more likely I think). Does anyone know anything about this? Thanks! Link to comment Share on other sites More sharing options...
Soma Posted October 30, 2013 Share Posted October 30, 2013 You need more memory. Link to comment Share on other sites More sharing options...
adrian Posted October 30, 2013 Share Posted October 30, 2013 In your php.ini file, look for the memory_limit setting and increase that as needed. 1 Link to comment Share on other sites More sharing options...
Joe Posted October 30, 2013 Author Share Posted October 30, 2013 Yes, more memory. I only found it curious that not file size but image dimensions seem to require it. Link to comment Share on other sites More sharing options...
Soma Posted October 30, 2013 Share Posted October 30, 2013 I bet if you open those images in photoshop the larger image would use more RAM than the smaller. With jpg's the file size can foul you. 1 Link to comment Share on other sites More sharing options...
Joe Posted October 30, 2013 Author Share Posted October 30, 2013 Thank you guys! Well I´ve beefed up my memory_limit to 1024M in php.ini (was at 128M), now I can upload half a dozen of those at the same time... ...just as a test. In reality it´s kind of dumb to upload giant images just for them to be re-sized, but I have users who have never used any image manipulation software and just plug in their digital camera...I wonder where the possible disadvantages might be of upping the memory limit like that, I guess I could set it even higher... (assuming my hosting environment doesn´t prohibit it;-) 1 Link to comment Share on other sites More sharing options...
Joe Posted October 30, 2013 Author Share Posted October 30, 2013 In your php.ini file, look for the memory_limit setting and increase that as needed. I bet if you open those images in photoshop the larger image would use more RAM than the smaller. With jpg's the file size can foul you. 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