LFS files aren't downloaded during build

Hi, @roobottom, I also want to chime in here to make some finer points clear:

  • Large Media is Netlify’s Git LFS service.
  • If you use Git LFS, you are not required to use Large Media. (You can use the Git LFS provided by the repo host: meaning Bitbucket, GitLab, GitHub.)
  • The raw images are available during site build with other Git LFS services but not with Large Media.
  • Image resizing works at browse time (post build) with Large Media but not with other Git LFS services.

Using the Git host’s Git LFS service or the Netlify’s Git LFS service (Large Media) is either/or. You can use one or the other, but not both. Switching back and forth between them can be done (but isn’t “simple” so changing often would require a fair amount of work).

If you use Large Media (Netlify’s Git LFS service), it enables image resizing after deploy when the image is requested (at browse time).

If you other Git LFS services you can image resize during the site build but not after (unless you “build & deploy” again to resize again).

To summarize, you can do build time image transformations with Git LFS stored files provided those files are using the Git host Git LFS service.

If that is your goal (using Git LFS and doing build time image processing), please let us know. The next steps will be to uninstall the Large Media add-on from the site and then using the environment variables for Git LFS to ensure our build system does download the actual file (instead of the Git LFS text pointer). That is done with the environment variable of GIT_LFS_ENABLED=true.

Again, please let us know if you want to uninstall Large Media based on the information above. This is a manual process our support team can complete. If we should uninstall Large Media, please read the Large Media uninstall guide first and let us know when you are ready to proceed.

3 Likes