How can I disable Large Media Files?

I need to disable Large Media files. I enabled it before but then I moved to another provider, and set the GIT_LFS_ENABLED to true, but my builds get the following error:

1:10:57 AM: Build ready to start

1:10:59 AM: build-image version: 9cade8af58c2cf3a17a1e9433d2e979149488837

1:10:59 AM: build-image tag: v3.3.5

1:10:59 AM: buildbot version: 6fd888c8d66fd09bb18f09e1728e11fbc555b868

1:10:59 AM: Fetching cached dependencies

1:11:00 AM: Starting to download cache of 88.6MB

1:11:01 AM: Finished downloading cache in 1.105344229s

1:11:01 AM: Starting to extract cache

1:11:04 AM: Finished extracting cache in 3.317709101s

1:11:04 AM: Finished fetching cache in 4.675135969s

1:11:04 AM: Starting to prepare the repo for build

1:11:04 AM: Git LFS enabled

1:11:04 AM: Configured environment variable GIT_LFS_ENABLED=true conflicts with Netlify Large Media.

1:11:04 AM: If you are moving from another LFS service, make sure to migrate all LFS files to Netlify, then remove GIT_LFS_ENABLED variable from your Netlify Build & deploy settings.

1:11:04 AM: Failing build: Failed to prepare repo

1:11:04 AM: failed during stage ‘preparing repo’: Conflict LFS setup

1:11:04 AM: Finished processing build request in 5.313250264s


My Netlify instance name is: https://relaxed-kirch-68b200.netlify.com/

H, @eashi, and welcome to the Netlify community site. :+1:

We have sent you an email to the email address associated with your Netlify account, and we’ll communicate with you through that email to continue resolving this issue. (Please note that for security reasons, we will not contact you at email addresses not listed in your Netlify account.)

Also, please let us know with a reply here if you don’t receive a message from us.

Hello,
I too am facing the same problem.

I am using Git LFS on Gitlab and facing the above error while deploying to Netlify. Can you please help me with this?

My site name: ketanvijayvargiya

Hi, @eba9280d263e58958b1f. Large Media is a Git LFS service that stores the file (and also enables image transformations on sites deployed with our service).

GitLab also has a Git LFS service. Obviously, their Git LFS doesn’t do image transformations here at Netlify though.

You can use only one of these Git LFS services - either/or but not both. Right now there are settings for both and that is the reason for the errors.

The solution here will be to first pick only one Git LFS service and get the site settings configured correctly for it at Netlify.

In other word, step one is: Which Git LFS service do you want to use, Large Media or the GitLab service?

You can use either one as both do work. Please let us know which one you choose and we’ll assist with getting that one working.

Let’s say you pick the GitLab Git LFS service. If so, then someone on our support team (probably me) will need to remove the Large Media add-on from the site. After I do this, locally in your repo you would then remove the .lfsconfig file. Next you would commit file deletion change and push that commit upstream. If everything else is configured correctly (which it probably is) then push will trigger a build at Netlify and the build will be successful.

If it isn’t successful, we’ll keep troubleshooting until it is.

Now, let’s say you want to use Large Media instead. If this is the case, then leave the .lfsconfig file in the repo. Don’t delete it because that is the file that points the repo to Large Media as the Git LFS service. Next, remove the environment variable GIT_LFS_ENABLED=true because that is only needed for third-party Git LFS services (meaning anything Git LFS service that isn’t Large Media). Now trigger a build either in the web app with the “Trigger build” button or with a new git commit.

This should trigger a build using Large Media and it should work. Again, if it doesn’t work, we’ll be happy to keep troubleshooting to find out why and get it working.

Again, if you don’t want to use Large Media, I have to remove it from the site so please let us know if this is the case. Similarly, if there are any questions about this please let us know and we will be happy to answer.

Hello,

Thanks for responding.

Sorry, if I wasn’t clear earlier. I’d like to use Gitlab’s LFS and not Netlify’s. I’ve already set GIT_LFS_ENABLED=true, so can you please remove the Netlify addon for my site?

Hi,

I also need to request disabling Large Media because of the Gatsby Image limitation.

My site name is devon-stories

Many thanks!

Hello,

Could you please take a look at this? I am blocked on pushing new content to my site right now, so would appreciate help from you on this.

Hi, @eba9280d263e58958b1f, the Large Media add-on has been disabled for the site ketanvijayvargiya.

@joeblurton, the Large Media has also been disabled for the site devon-stories.

If either of you have any questions, please reply here anytime.

Thank you - I just tested this and it works.

Appreciate your help.

Thanks Luke :smiley: