Jump to content

Image field: image resizing on server problem


Joe
 Share

Recommended Posts

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

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;-)

  • Like 1
Link to comment
Share on other sites

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...