Images from LFS stopped working after switching build to Focal

I am seeing “the server responded with a status of 400” for all images in LFS after switching build from Xenial to Focal. Returning back to Xenial resolves the issue (although I’ve seen the same issue before with Xenial from time to time).
I even tried to create a new site and import a fresh new git repo – same issue.
Does anyone else experience this problem?

Hi, @ilyabo. Our support team would like to find out why this happened. I suspect that Large Media is being used on the site in question.

Would you please send us the site id (or the deploy id) for the deploy that returned the 400 status for the LFS files?

Thanks for the quick response @luke!

Here’s the site id: famous-marshmallow-95abf3

Hey @ilyabo,

It appears you’re using Next/Image along with LFS. Is there a specific reason to be doing that? I think both the tools are meant for the same purpose - so why use both together? I’d recommend stopping the use of either 1 of them.

Hi Hrishikesh,

Thanks for looking into this.

I use Git LFS to avoid committing many large image files to GitHub. I don’t need version control on them.
I use Next/Image to have the images automatically resized on the fly and delivered to the clients in the appropriate resolution depending on their device.

To me these are two very different purposes. Or am I missing something?

Ah, I see now that you also offer a similar image transformation service for LFS

Do you think I should use it instead of Next.js Image?

How come then that it works with LFS and Next/Image on this site which is identical to https://famous-marshmallow-95abf3.netlify.app/ except that it runs on Xenial, not Focal

Oh yes, the confusion arose because I assumed you were talking about Netlify’s LFS service. That’s because I saw this: Netlify App

So it looks like you’re using Netlify Large Media. That would not work. You’re free to use Git LFS and that would not have any issue.

If you plan to switch to Git LFS from Netlify Large Media, let us know. We need to uninstall it from our end to safely remove it.