Problem with commiting files to LFS via web UI

We have a repo with git lfs (.gitattributes placed in root dir with instructions to put image files to git LFS)
When I commit image file locally it is successfully placed to git LFS. After pushing to GitHub I can see that file is stored in LFS.

But when I try to upload image file via web UI on github.com it is just added in repo (not in git LFS) and when I fetch changes on local machine git does not recognise image file (maybe it expects not image file but a link to file stored in git LFS)

By the way, it would be very helpful if files stored in lfs were marked so in a list in web UI. Now I have to open it to see the note Stored with Git LFS

Hi kvzhkv! :wave:

I’m afraid pushing files to LFS via our web UI is not supported. Using LFS requires that LFS is initialized on the repo, which sets up Git hooks that catch the appropriate files and redirect them to the LFS service rather than the conventional Git repository.

The web UI lacks these hooks, and can’t consult the .gitattributes file to see what types of files it should deal with. (Similarly, it doesn’t check the .gitignore file so you can create and commit files from the ignore list directly in the UI if you so choose.)

Consequently, you can only push to LFS from the command line, or a client such as GitHub Desktop that can utilize the Git hooks and consult the .gitattributes file.

Having an indicator of which files are stored in LFS in the UI would be very useful! Perhaps you’d like to submit a feature request through our official product feedback form so that our product team can see exactly how you’d like GitHub to work?