Support Forums

LFS files not getting deployed

My LFS files, which are getting committed fine to Github, and even showing up in the Large Media tab in my Netlify dashboard, are somehow not hosted on my server. This is only happening for recently uploaded files. I had to rerun netlify lm:setup after the netlify.com --> netlify.app change.

Example file that should be deployed: https://happyhour.fm/media/055.jpg



This thread has a bunch of advice on debugging that is probably the best place to start, since our office is closing for the week and our Large Media expert is already off for the weekend:

Let us know how it goes!

My setup all looks great following all the troubleshooting in that thread.

$ netlify lm:info
  ✔ Checking Git version [2.20.1]
  ✔ Checking Git LFS version [2.7.0]
  ✔ Checking Git LFS filters
  ✔ Checking Netlify's Git Credentials version [0.1.9]

$ git lfs track
Listing tracked patterns
    public/media/* (.gitattributes)
Listing excluded patterns

$ cat .gitattributes
public/media/* filter=lfs diff=lfs merge=lfs -text

$ cat .lfsconfig
	url = https://844123f3-5a38-4a31-b03b-b2e596b5a244.netlify.app/.netlify/large-media

File in Github: https://github.com/erikras/happyhourfm/blob/master/public/media/055.jpg

File not on website: https://happyhour.fm/media/055.jpg

Similar file does work: https://happyhour.fm/media/054.jpg

Any ideas?


Hi, @erikras, from what I can tell the image in questions was somehow uploaded to GitHub’s Git LFS service and not Large Media. Here are the two images in the repo as an example. Here are the published URLs:

not working -> https://happyhour.fm/media/055.jpg
working -> https://happyhour.fm/media/054.jpg

Note, the “not working” image shows the image at GitHub:

The working image shows as Git LFS pointer (text data):

First, would you please double check that you are are on the lastest version of the Netlify CLI by upgrading:

npm i netlify-cli -g

Then logout and back in again:

netlify logout
netlify login

Once that is complete, then try uploading the Git LFS images to Large Media again:

git lfs push --all origin

After all these steps are complete, please try triggering a new deploy with a new commit and git push to the upstream repo. Then check the new deploy to see if this issue is resolved.

If it does not resolve the issue (or even if it does), please reply here anytime to let us know your results and/or if there are other questions.

Awesome! Thank you! That one line was what I needed:

git lfs push --all origin