Jump to content

Out of Memory on Image Upload


Recommended Posts


I have an problem that when uploading a new image, the uploaded stays at 100% but no image was uploaded.

I tried chaning memory_limit and co. to 256M or so but nothing worked either.

In the error log, there was an out of error warning, caused by core/ImageSizer.php.

So: I used "Max Image Dimensions" for resizing every image above 1500px to 1500px.

Here is the thing:

After disabling this feature, so I don't use max image dimensions feature, everything works.

How can I enable this feature without breaking everything?

It seems that it's a bug in ImageSizer.php that can't handle with large files on some server systems?

I hope for your answers!

Link to comment
Share on other sites


that were my first two search queries I used to find an answer... And no, nothing worked.

I wrote that I changed php.ini, mentioned in one or two of other posts on processwire.com...

The thing is: I can prevent the error by disabling the max image dimensions feature but if not, my clients would upload some 4MP images and that's pretty bad for a website that tries to stay performant for mobile devices... And this max-width feature is pretty nice, but it won't work because of "out of memory" error.

Link to comment
Share on other sites

@nico, i think you mean $image->width(1500)->url ?

edit: tried size(1500)->url and it worked! even though it's not in the docs https://processwire.com/api/fieldtypes/images/


sorry, didn't know that and didn't read all the results...

i agree, leaving a 4MP image on the server may not be the best - but it would not necessarily be a performance problem as you can resize the images for your frontend like nico posted above. but it could still be a problem regarding disk space usage if you have lots of huge images...

to your problem: sorry, i have no idea - but as horst jumped in: let the expert talk :)

  • Like 1
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

  • Create New...