Image upload fails because of high picture resolution

Hmm… I don’t know, what could cause your issue, other than that. Maybe you have another RAM hungry process somewhere, that doesn’t cleanup correctly or your system setup is different and something uses more RAM here and there.

Can you double check, if your memory_limit change took effect?
Did you try it with more than 512? If that doesn’t work, the issue might be somewhere else.

If you want to reproduce my debugging procedure, you can add my simple debug log code to /config/bootstrap.php and than call debug(memory_get_usage()); before and after the imagecreatefromejpeg() parts to see the memory peaks.

I don’t know, how and if it works: