I'm building a website which uses next-optimized-image pretty heavily to resize and optimize images.
My builds were working fine locally, but failing on Vercel with the message Error: Input file contains unsupported image format popping up for every image. After a long evening of furious googling and debugging, it turns out the problem is I am using Git LFS to store large images in my Git repo, and Vercel does not support Git LFS yet. The image files next-optimized-images sees are just placeholders instead of the actual image files.
There is probably noting next-optimized-images can do about this issue, but I wanted to document it here so no one else has to bang their head against the wall as long as I did.
I'm building a website which uses next-optimized-image pretty heavily to resize and optimize images.
My builds were working fine locally, but failing on Vercel with the message
Error: Input file contains unsupported image format
popping up for every image. After a long evening of furious googling and debugging, it turns out the problem is I am using Git LFS to store large images in my Git repo, and Vercel does not support Git LFS yet. The image files next-optimized-images sees are just placeholders instead of the actual image files.There is probably noting next-optimized-images can do about this issue, but I wanted to document it here so no one else has to bang their head against the wall as long as I did.