File extension seems to matter when using the image transformation service

Hi

This is more of a bug report, or at least a curious observation on my end:
I had a problem with some of my images. Most were resized as expected using the transformation query string. Some of them did not work.

I tried renaming ( dump spaces in the filenames ), deleting, re-uploading, … since I uploaded a few images before I had Git LFS / NLM enabled. So I thought it might be something to do with indexing, content-type, … Browser inspector told me the file was of type image/jpeg etc. Everything looked fine. Except the end result.

The fix was: renaming the file extension from jpeg to jpg.
These images are exports of the macOS Photos app, taken with iPhone and are 4-5Mb in size.

Welcome! File extensions matter indeed. When setting up LFS / NLM you probably ran:

git lfs track "*.jpg" "*.png"

You’ll have to add *.jpeg to that list to support .jpeg files.

2 Likes

More info on how to add extra extensions here:
Large Media setup | Netlify Docs.
Following that guide I was able to tackle the problem.

Thank you @tomrutgers.

1 Like