Problem getting Netlify Large Media to work

Site Name: https://kind-davinci-e11ffa.netlify.app/

Hey everyone thank you for the help in advance, i am having a hard time getting the Large Media to work. I am using create-react-app so i am not sure if that falls under one of the limitations listed in the docs, but i figured i should throw that out there

Ive gone through all the setup and this is my response when i run netlify lm:info
image

And the files i want to be uploaded do appear when i run git lfs ls-files (i cant attach another image as i am a new user but trust me they do show up haha)

However after i implemented all this the pictures stopped showing up on the live site and they do not show up under the large media tab on the netlify dashboard, ive looked through a lot of the posts here where there were similar problems but none of their solutions really helped me much. I was just going to disable it but apparently its harder that it sounds so i decided to try and fix it first. Any help would be appreciated, thank you

Hi, @Munson1970, I checked this site and it isn’t using Large Media at this time:

https://app.netlify.com/sites/kind-davinci-e11ffa/large-media

Did you run the netlify link and netlify lm:setup commands in the repo directory? If not, those instructions can be found below:

If so, do you still have the output of those commands?

Also, if you ran the netlify lm:setup, do you see the .lfsconfig file in the base of the repo? If so, what are the contents of that file?

Here is an example of that file for a testing site of mine:

[lfs]
	url = https://fe21b1ce-1d9a-4899-bbff-a0d7bcb55ad0.netlify.app/.netlify/large-media

The answers to the questions above will help us research why this isn’t working and please let us know if there are other questions.

Yes i followed those instructions and i do have a .lfsconfig file in the base of the repo and it looks like this

Hi, @Munson1970, I do see Large Media installed on the other site on the account which has the API ID listed above:

5ecd098a-77a4-4dd9-90d3-1302286399b9

Note, this is the API ID (not the API key) and it is safe to post these IDs publicly.

For that site, I don’t see any media files in the deployed file list:

/robots.txt
/netlify.toml
/manifest.json
/index.html
/asset-manifest.json
/precache-manifest.cd6b392eaba523e81c7fc9123fe37cc2.js
/service-worker.js
/static/js/2.b849c971.chunk.js.map
/static/js/main.49b4cfd2.chunk.js.map
/static/js/2.b849c971.chunk.js
/static/js/runtime-main.83c3e0c4.js
/static/js/main.49b4cfd2.chunk.js
/static/js/runtime-main.83c3e0c4.js.map
/static/js/2.b849c971.chunk.js.license.txt
/static/css/main.a7b415a4.chunk.css.map
/static/css/main.a7b415a4.chunk.css

Based on this I suspected this site is embedding images as base64 encoded text in the HTML, javascript, or other site files. Next, I checked a non-working image and saw the following:

  <img class="Header_logo__y_jhg" src="data:image/gif;base64,dmVyc2lvbiBodHRwczovL2dpdC1sZnMuZ2l0aHViLmNvbS9zcGVjL3YxCm9pZCBzaGEyNTY6MDMyYTZjYzExNWNjZDAwMjljOTc3NDg5Y2JhMGM3YWViOTFhOWJkNTVkMWI1Yzk0YTZiZjgyZjU0MWE0MDMzOQpzaXplIDMzMDg4Mwo=" alt="Loading...">

I decoded this base64 encoded string and see this:

$ echo "dmVyc2lvbiBodHRwczovL2dpdC1sZnMuZ2l0aHViLmNvbS9zcGVjL3YxCm9pZCBzaGEyNTY6MDMyYTZjYzExNWNjZDAwMjljOTc3NDg5Y2JhMGM3YWViOTFhOWJkNTVkMWI1Yzk0YTZiZjgyZjU0MWE0MDMzOQpzaXplIDMzMDg4Mwo=" | base64 --decode
version https://git-lfs.github.com/spec/v1
oid sha256:032a6cc115ccd0029c977489cba0c7aeb91a9bd55d1b5c94a6bf82f541a40339
size 330883

This is a Git LFS text pointer instead of the image itself. This is a limitation of Large Media as documented here, quoting:

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.

To summarize, either the site build will need to be changed to store the images in their original format or the Large Media add-on will need to be removed for this site.

If you want to uninstall Large Media for this site, would you please confirm you have read the following Support Guide?

If you have read that, please confirm you have backups of all files and let us know you are ready for the add-on to be removed.

​Please let us know if there are any questions and/or if we should uninstall Large Media for this site.

I have local backups so im ready for it to be removed, thank you for the help

Hi, @Munson1970.

We have removed the Large Media add-on from this site.

Would you please push the commit removing .lfsconfig to the upstream repository? This will trigger a new build.

Please let us know if there are any issues with the new build or deployed site.

Hey luke i deleted the file and pushed the changes but the build still failed. I read through the instructions again and i believe i did everything right

Hi, @Munson1970, it looks like the error is this:

7:10:31 PM: Error checking out branch: Downloading src/assets/Logo-Banner.gif (331 KB)
Error downloading object: src/assets/Logo-Banner.gif (032a6cc): Smudge error: Error downloading src/assets/Logo-Banner.gif (032a6cc115ccd0029c977489cba0c7aeb91a9bd55d1b5c94a6bf82f541a40339): batch request: missing protocol: ""

Errors logged to /opt/build/repo/.git/lfs/logs/20200714T021031.000314779.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed

Based on this, it appears the our build system still thinks Git LFS (but not Large Media) is being used. Is that correct? Does this repository still use Git LFS?

If so, are you setting the GIT_LFS_ENABLED and (possibly) the GIT_LFS_FETCH_INCLUDE environment variables at Netlify?

The first of those above ( GIT_LFS_ENABLED ) must be set to 1 or true if Git LFS (and not Large Media) is being used by the repo.

That was the problem! Thank you for your patience, I am very new to this so i appreciate the help

1 Like