On a live environment I'm hitting an error when uploading some jpg images, which wasn't a problem on dev or production.

I can get around it by re-exporting the image out and keeping it under 1mb, but as the site has a form with an upload field I need to figure out what the environment issue could be with being picky over these. Where should I start?

This happens whenever I try to upload problematic images, not just from the front-end form field, but also directly into Crafts Assets. The file name in the error message is also not what the actual file name is - it looks like it creates some temp name for it.

enter image description here

EDIT: Found out that the server doesn't have Imagick installed but has GD 7.2.17. Could this be the issue?

  • Have you tried re-saving the actual image using Photoshop or similar? Is it possible that the original file, for example has a .jpg extension but it's actually a different file type? – darylknight Nov 21 '19 at 11:17
  • Yes re-saving it in PS and keeping it small did help. However I can't call that the solution as there is a front-end form with an upload, and the other environments I had this site on previously didn't have this issue. – sarah3585 Nov 21 '19 at 15:14
  • I've found the same issue with uploading photos from an iPhone. Possibily due to the HEIC format Apple now uses? – sarah3585 Nov 22 '19 at 15:43
  • Imagick does support a much larger range of image formats and extensions, so I'd probably start there. Other things to check: craftcms.com/guides/troubleshooting-unsuccessful-file-uploads – Brad Bell Nov 23 '19 at 0:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.