Problem getting Netlify Large Media to work

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

Hi, I am having the same problem. How can I work through this?

hi, can you please also remove add on from my website?

Hey there, @afsheen :wave:

Thanks for letting us know you want to uninstall the Large Media add-on for your 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 which site to remove Large Media from. To identify the site, you can send us the site subdomain, API ID (the id not the key), or a link to the site (whichever you prefer).

Once we know which site, we’ll reply soon to confirm the add-on has been uninstalled.

​Please let us know if there are any questions and, if not, please tell us the site to do this for.

wait, I lost my local backup for files today! if I don’t remove the add on, how else could I solve this?

@Luke how do I work through this issue?

Hi, @afsheen.

I don’t know as you haven’t shared the details with us. Also, there appear to be three separate topics where you are asking questions about this. Let’s keep all the questions to a single topic going forward. I won’t reply to other topics about this so please keep all questions about the Large Media issue here.

Is this the correct site id (cd3b5304-e96f-42ed-ba4a-f5058018bba1)?

If so, I can remove the Large Media add-on but it won’t restore your local files.

Regarding how to get your repository back to the state it was in before, how to do that depends on what you did to get it into the current state and what the issue is. However, you haven’t shared those details here.

Would you please tell us more about what is happening? What actions have you taken and when the the issue start occurring?

If you want us to proceed with uninstalling Large Media or if there are other questions, please let us know.

yeah, I tried finding solutions elsewhere, sorry for that. this is the correct site id. and about the large media add on, I needed to load images faster, so I started looking into cloud servers but while reading docs I got into large media plugin. now, I also need link to all the images individually to add to the db, so that its easier to add next time which I assume I won’t be able to have with the plugin. on Saturday, I tried to do something during which I lost all my files including remote repos, but since I deployed it once before adding large media I was able to retrieve data till that point. The current state of my remote repo is not linked with large media but I am assuming it is in my netlify account. My question is, a. would it be easier to add new folders of images to large media then maybe some other cloud server? and b. If so, then do I need to link my current remote repo and set up large media again with the site? Also, I tried some other things as well all leading to some other kinds of errors but mostly, I haven’t deployed my changes since the last time I asked here about not being able to see images in large media on my netlify account. Thanks a lot for your patience! I am fairly new so grateful for any help you provide!

Hi, @afsheen. Large Media is a Git LFS service. The Git LFS service is normally provided by the upstream Git repository host (GitLab, Bitbucket, and GitHub). Moving the Git LFS service to Large Media enables browse time image transformations (as opposed to build time transformations).

Using Large Media isn’t required. You can use Git LFS and not use Large Media.

Using Large Media is optional. If we uninstall the Large Media add-on for the site, it doesn’t change anything with the repo itself. It just disables our Git LFS service at Netlify for this site. It won’t stop you from using Git LFS itself.

About these questions:

would it be easier to add new folders of images to large media then maybe some other cloud server?

I don’t know. That depends on the other cloud server and how you define “easier”.

If so, then do I need to link my current remote repo and set up large media again with the site?

If you are using some other cloud hosting for images, Large Media would not be used.

Do you want to remove the Large Media add-on to remove that factor from troubleshooting? Do you want to try to get Large Media working for you?

​Please let us know how you want to proceed.

1 Like

Hi @Luke , thanks for being really patient with me! my easier would be, if its some non coder, would they be able to easily upload new folders on large media as well? I wanna try to get large media to work here.
Thanks,
Afsheen

Hi, @afsheen. When uploading files using Git LFS some credential must be used. If you are using Large Media for Git LFS, then your Netlify credentials are used for the Git LFS files and all files not using Git LFS use your credentials for the Git host.

If you want someone else to upload file to Large Media they would either need to be a member of your team at Netlify (and there is a monthly charge for additional team members) or you would need to use a CMS and Git Gateway to allow other to git push using your credentials.

If you want to get Large Media working, it would help us to know what type of issue is occurring. What isn’t working? What error message do you see and what are you doing when you see it?

the other person won’t know how to push with Git LFS I would like to remove the plugin. Thanks a lot for all your help and being really really patient with me!

HI, @afsheen. We have removed the Large Media add-on from the site now.

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

Please keep in mind that you might want to run the command below after deleting the .lfsconfig file:

git lfs push --all origin

This will sync the local repo’s LFS objects with the Git LFS service at the original Git host. It pushes any new binary blobs to their LFS service which may have been added after you moved the LFS service to Large Media.

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

okay! thanks a lot for your time and patience!

1 Like