Image size is not the problem here, because my image is 800 Kb.
My image upload works flawlessly at any resolution below 2900 x 2176. Over that threshold, it doesn’t work. No image is uploaded. Why is that happening?
I’ll put some code of my upload handler, just in case, but not sure if it’s relevant.
The error is:
PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 8884 bytes) in /path/imageResizer.php on line 34 –
which refers to…
if( $this->image_type == IMAGETYPE_JPEG ) { $this->image = imagecreatefromjpeg($filename);
What kind of break occurs? Any errors being thrown?
Possibilities:
EDIT: As @deceze said, you can do use this function to temporarily raise the allocated memory: