Converting a photo needs memory for every pixel. A 24 megapixel photo can need over 200 MB while it is being encoded. With a low PHP memory limit, large photos fail and smaller ones still work.
Raise the limit
Add this line to wp-config.php, above the line that says “That’s all, stop editing”:
define( 'WP_MAX_MEMORY_LIMIT', '512M' );
WordPress uses this higher limit for image work in the admin and background tasks. If your host caps PHP memory lower, the line has no effect; ask your host to raise memory_limit to 256M or more.
Then
Array
Array