How do I disable Netlify Large Media for my site?

My site is platypus-schoolhouse /

I would like to disable Netlify Large Media and use GitLab LFS support instead (my site is hosted on GitLab).

My reasoning is that I need the repo for this site to be a monorepo with other sites added eventually. Also, I would prefer to handle the image transformation myself in a more generic fashion. I have also had difficulty getting LM to work every time I clone a GitLab site that has LM enabled, and I think my lif would be simpler just using GitLab’s LFS support and manual image transformation.


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.

I have read the Guide and I have backups of my project. You might add to the Guide a note that if they are using GitLab’s LFS (and possibly on GitHub too) they will need to go switch that back on in the repository settings. Also, having to set the GIT_LFS_FETCH_INCLUDE variable is a little annoying - just another thing to keep in sync with .gitattributes… Hopefully this issue (Don't set a GIT_LFS_FETCH_INCLUDE and always clone the actual content for all Git LFS tracked files · Issue #371 · netlify/build-image · GitHub ) will get resolved soon.

Please go ahead and remove NLM and let me know when I can proceed.

Hi, @jbstewart. 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.

Hi there Unfortunately it failed. I set the following variables for my Netlify project:

I switched my GitLab repo settings to turn on GitLab’s LFS service

I did:
git rm .lfsconfig
git add -A
git commit -m “Removing .lfsconfig - switching from Netlify Large Media to GitLab LFS”
git lfs push --all origin

which succeeded… I then typed

git lfs ls-files

and it printed:
╰─$ git lfs ls-files
58abd9a690 * public/icon.png
309875c786 * public/images/DownloadsIcon_1024.png
96887f2456 * public/images/DownloadsIcon_256.png
b1744c5a5c * public/images/DownloadsIcon_512.png
7c6f341d9b * public/images/EmploymentIcon_1024.png
1ea4442c59 * public/images/EmploymentIcon_256.png
d53b77790e * public/images/EmploymentIcon_512.png
f6b171cab6 * public/images/MaryTestimonial.png
e91d9617be * public/images/PJJ-Artwork.png
5e85d8997e * public/images/PSLogo-Chalkboard-1024.png
b309c81504 * public/images/PSLogo-V2-1024x1024.png
dd47eaae64 * public/images/PSLogo-V2-128x128.png
edcdbe11fa * public/images/ParkerIcon_01_1024.png
d56804f0c0 * public/images/ParkerIcon_02_1024.png
465e2e18db * public/images/ParkerIcon_03_1024.png
51207372be * public/images/ParkerIcon_04_1024.png
c5f23ef46a * public/images/ParkerIcon_05_1024.png
68c8ca85f9 * public/images/PaulTestimonial.png
acc49a5f07 * public/images/PeterTestimonial.png
8e1dae6f5e * public/images/Platypus-Name.png
f5ad7a3de2 * public/images/PlatypusSchoolhouse-Logo-248x248.png
b97560f494 * public/images/PracticeJobJumpstart.png
cfefd06596 * public/images/SocialSkillsIcon_1024.png
4c4e68aa59 * public/images/SocialSkillsIcon_256.png
a9671a2d10 * public/images/SocialSkillsIcon_512.png
6a74c56917 * public/images/StepNumber1.png
f2725e335f * public/images/StepNumber2.png
f02a2100d4 * public/images/StepNumber3.png
986d861673 * public/images/bonnie-and-brian.jpeg
cea41392a8 * public/images/family.jpeg
25f662a452 * public/images/paul.jpeg
eb71610e4b * public/images/wrong.png
393aa3e7e3 * public/og_image.png

I then did a git push, and Netlify picked up on it but the build failed
I thought maybe I should have pushed the lfs files to my branch so I did:
git lfs push --all origin mss-makeover // the branch I am doing this on

And then I re-triggered the build but it failed again.

I also accidentally triggered a build (through the Nelify UI) of the main branch, and it too failed. Which surprised me since main should still have it’s .lfsconfig file… I am a little fuzzy on how git branches interact with git lfs I guess.

Anyway, I am dead in the water now. Any help you can provide for getting my site building again I would greatly appreciate.


Hi, @jbstewart. This is the error in the backend for the deploy below:


batch response: Repository or object not found:
Check that it exists and that you have proper access to it
error: failed to fetch some objects from ''

This shows that the .lfsconfig file still exists in the repo for the branch used for this deploy. You must remove that file in branches to be able to clone those branches for this repo now.

If there are other questions about this, please let us know.

Well, the problem was not .lfsconfig. I verified it was gone. I even deleted the one in my main branch and pushed that but it still failed. I had to remove all the images (anything that was stored in NLM) from each branch, commit that (it built), then I re-added them all and pushed that and it built again.


I do have one additional question. If I fork this repo now that I have switched it to use GitLab LFS, will the new fork use NLM when I first link it to a Netlify project, or will the link command detect that I am using a different LFS provider? What about creating a new repo from scratch and linking it - is NLM opt-in or opt-out?