Jpg will load, resize and save, Jpeg wont't

Hi

I have a standard server action which uploads and image, repeats the load, then resize, then saves.

All works as expected on my desktop browser.

If I try the same thing on my iphone, the image loads OK but all the other steps fail. The only difference I can see is the image on the PC has a jpg extension and the image uploaded via the iPhone has jpeg extension.

Anyone had a similar problem and found a solution?

CK

Have you got your iPhone set to save as HEIC? I guess not if you’re sure it’s saving as .jpeg

Have you tried uploading a .jpeg on your PC to confirm it’s the extension that’s the issue? I’ve not had any problems with either jpg or jpeg.

You could also copy the image from your phone to your PC and then upload it so you can see the errors in the dev console.

Can you check your server logs for errors? Also does the same thing happen if you get your iphone image and upload it from the computer?

Hi Teodor,

Its not the file extension thats causing the error, its a php memory shortage;

[Tue Aug 26 16:41:08.669753 2025] [proxy_fcgi:error] [pid 132364:tid 139963186280000] [client 146.75.168.54:0] AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/vhosts/mydomain.com/httpdocs/dmxConnectLib/lib/image/Processor.php on line 326', referer: https://mydomain.com/update.php?id=545

134217728 bytes (134mb) seems a lot to process a jpeg of 4.3mb in size

changed php.ini to 512mb and it now works OK…

What are the exact server action steps in your server action?

Image manipulations take a lot of memory especially with the several resize steps you have in the server action. See:

Thank you for your guidance

I would also recommend on your “file upload” field to set the size beforehand. So that you resizes before you upload. This will help if you uploading from a iphone in hdr… instead of uploading a 4.3mb.. it will resize it …

<input id="file1" name="file1" type="file" image-max-width="1200" image-quality="80">

Go see

1 Like