Once activated the module I receive the an error uploading images from an iPhone 6s. I tried with a Moto G Android 5.0.2 and it uploaded fine.
On server log the error seems to be related with the image size, but the same image upload fine without this module and even larger images upload fine from desktop, while the same image taken from the phone and upload from the desktop produce an error.
[client 150.214.65.92] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 12096 bytes) in /modules/system/image.gd.inc on line 150, referer: http://mysite.com/node/add/article
Actually upload size limit is 8 MB and images that produce errors are around 2 or 3 MB.

Comments

mato created an issue. See original summary.

mtoscano’s picture

I tried with a iPhone 5c and it worked perfectly, so the problem seems to be limited to the new 6s. The module code is quite simple so I don't know where the problem can be, but the camera resolution upgrade seems to be related. On iPhone 6s it happen with both normal and live photos.

dokumori’s picture

[client 150.214.65.92] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 12096 bytes) in /modules/system/image.gd.inc on line 150, referer: http://mysite.com/node/add/article

This seems very much like that PHP is running out of memory. Try increasing the PHP memory limit (either in php.ini or settings.php)

mglaman’s picture

Status: Active » Postponed (maintainer needs more info)

If you're dealing with phones that have large pictures, do as #3 suggests and boost memory. Or, try using ImageMagick for image processing versus the PHP GD library. That might help. Can't say how you do it, but a good Google search should dig up info.

Going to put for "needs more info" until we get some results. Good documentation can come out of this.

mtoscano’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Thanks for your suggestion. The problem was the PHP memory, I had to increase it up to 256MB using .user.ini to be able to upload images from iPhone 6s.
The uploaded images, now correctly orientated, are around 2MB in size.

Sahil Gupta’s picture

You can use a module to control this memory limit as well. PHP Runtime Configurator module provides many options to configure without changing your php.ini file and restart Apache.
You can configure following parameters:

- File Upload Limit
- Memory Limit
- Maximum Execution Time Limit
- Maximum Input Variable Limit

mtoscano’s picture

Thanks for the suggestion.