I read through this entire thread, trying each recommendation that was applicable to me, and I still see the “Your site has no large media assets uploaded” message in the Large Media tab of my site dashboard.
I can confirm:
I think I meet the documented requirements for LM (are the file type or size restrictions?)
The actual file is uploaded to the git repo, not a pointer
I’ve performed ‘git lfs push --all origin’ and triggered a new deploy
When I run ‘netlify lm:info’ I get:
Checking Git version [2.19.0]
Checking Git LFS version [2.11.0]
Checking Git LFS filters
Checking Netlify’s Git Credentials version [0.1.9]
I’m not sure what else to check/try. Any suggestions?
The /favicon.ico is working when I test but I don’t see any other media files? Are you sure the files are deployed as part of the build?
I suspect the site build might being trying to embed the images as base64 encoded text in the site HTML itself (or javascript). If so, this doesn’t work with Large Media enabled.
If this is what is happening, that limitation is mentioned in the documentation here - quoted below:
Files tracked with Large Media are uploaded directly to the Netlify Large Media storage service on push, completely bypassing the site build. This saves build time, but also means that the files are not available to tools that process asset files during the build, such as Hugo’s image processing or the gatsby-image plugin. Depending on your needs, you may be able to replace this functionality with Netlify’s image transformation service.
If you don’t think this is the issue, would you please send us a URL for an asset which isn’t working?
I think I did everything above correctly, but when I try to upload a .pdf file it uploads directly to my Github repository instead of a pointer file, and no assets show up under Large Media on Netlify. What am I doing wrong?
My .lfsconfig points to netlify .gitattributes is tracking *.pdf git lfs ls-files lists the file I’m trying to upload
The files are not in my .gitignore
Hi, @socialistlegacy, it could be because Git believe the files are already in the upstream repo so it isn’t resending them.
If so, there is a way to “force” Git to upload them to Large Media:
git lfs push --all origin
Note, after doing this, a new deploy is required before the files will show up. However, I think it is working as I found a PDF when I tested and it is stored using Large Media. I’m going to private message you the URL.
If there are other questions, please reply here as PMs get much slower replies.
Hi, I am trying to use large media on my project. The tracked files are shown uploaded and the file are successfully converted to a pointer file on github. However, it still shows “no assets found” in the media tab on Netlify.
My current setting is:
(ROOT)/files/*.jpg to be uploaded as large media. files folder is under same directory with .lfsconfig and .gitattributes.
my project Publish directory: (ROOT)/src/public/
project Base directory: (ROOT)/src/
My .lfsconfig points to netlify
git lfs track contains the correct files
git lfs ls-files lists the correct files and their pointer hashes
The files are not in my .gitignore
My .gitattributes is correct
The pointers are in github
I was successfully to add large media files in another project on the same machine so I believe my config should be ok to push large media.
Do I need any extra permission from the project owner? I am only a collaborator of the project.
One of the most common issues is that Large Media doesn’t have a copy of the files. If that is the root cause, it can be fixed with the command below (run from the local repo base directory):
git lfs push --all origin
After running that, try a new deploy to see if the files start working. If they do not work, would you please give us a URL for a file which should work but does not?
I finally figured out the solution. It turned out the problem was the publish directory setting.
I am using gatsby for my web project so the default build command wont include the linked lfs files from the parent directory. Then I added a cp command to copy them into the publish directory after build. Then the files are visible in the large media tab.
It seems important to know that the large media tab on netlify is just displaying all “pointer files” under the publish directory.
If anyone else got similar problem as mine, please also make sure you have done extra work to “move” the linked files to the publish directory after build script finishes.
I am new to Netlify, feel sorry to disturb. Thanks for your help @luke !
Hi, @somratpro. I would also check to confirm if there is more than one version of Git installed locally. If so, make sure this configured so that the same version is always used.
If this doesn’t resolve the issue, would you please send us the output of the the commands below to help us troubleshoot:
git lfs version
git-lfs/2.4.2 (GitHub; windows amd64; go 1.8.3; git 6f4b2e98)
netlify lm:info
√ Checking Git version [2.17.1.windows.2]
× Checking Git LFS version
→ Check that Git LFS is installed in your system
√ Checking Git LFS filters
√ Checking Netlify’s Git Credentials version [0.1.9]
Git LFS version 2.5.1 or above, installed on your local machine. You can run git lfs version in your terminal to see if you have a valid version installed. If not, follow the installation instructions on the Git LFS website.
Large Media requires version 2.5.1 or newer and your system is using 2.4.2.
Please try updating Git LFS to a supported version. If this doesn’t resolve the issue, reply here anytime and we will keep troubleshooting.
hello Luke,
thanks for your quick reply. I have download and installed the git-lfs latest version (v2.12.0). but when I check it on the terminal, it says the version is v2.4.2. what should I do now? can you help with that?
Hi, @somratpro. I’m guessing that you have more than one version of Git installed and that the one you updated isn’t the one being used in the terminal window.
This isn’t exactly the same question but I think the solution here (updating the PATH environment variable) is the right one:
If this doesn’t help or if there are other questions, please let us know.
but the problem is when I test it on my localhost, all the images are showing, but after serving it with netlify(large-media-enabled) the images are not showing. how can I fix it?
You might want to private message that information.
You can private message (PM) that to one of our support staff and I’ve confirmed that PMs are enabled for your community login. Note, that only one person can see the PM and this will likely mean a slower reply than posting the information publicly. Please feel free to reply to however you prefer though.
Hi,
I have tried everything, but the problem does not solve. and when I run this command, here is the output
GIT_TRACE=true GIT_CURL_VERBOSE=true git lfs push --all origin
GIT_TRACE=true : The term ‘GIT_TRACE=true’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
Hi, @somratpro. The issue was something else. All those files do exist and work, it is just that asset optimization is enabled for this site and it cannot be used with Large Media.