Imagecreatefromstring(): Data is not in a recognized format

Hi!

I have upgraded to Nextcloud 17.0.1.1 on freebsd. It works fine, but when I upload a jpeg that is over a certain size, I get the message “Error loading [thenameofthefile].jpg”.

Looking at the logs, I see this:

“message”:“imagecreatefromstring(): Data is not in a recognized format at /usr/local/www/nextcloud/lib/private/legacy/image.php#622”

I download the file and it opens normally.

Is there anything I can do to fix this?

My php is PHP 7.2.24, nginx version: nginx/1.16.1.

Best,

Francis

My bad. The problem was that the file extension was saying JPEG, but it was a raw format file (ORF). If I change the file extension to ORF, it works, as the Camera Raw app correctly identifies the file.
So Nextcloud doesn’t identify the file by its contents, but by the extension. Somehow, dragging the files from Photos.app on mac didn’t provide me with the right extension.