What are the benefits of using LFS?

Hello!

Imagine I have a web site based on Hugo with gigabytes worth of static content, i. e. PDF and image files which never change (each file is added once, never removed, and never changed). The source code of the site is located on BitBucket and the site is hosted on Netlify.

Let’s imagine two scenarios:

  1. Scenario 1: All static content (those gigabytes of data that never change) is saved in LFS.
  2. Scenario 2: LFS is not used at all.

What are the advantages of scenario 1 (using LFS for big files that don’t change) versus scenario 2 (not using LFS)?

Thanks in advance

It can be simply put up this way:

If you don’t need to apply on the go transformations, or use API or something to access the files, that is all you need to do it link to them on your website, don’t use LFS.

These 2 threads might give more info:


1 Like

Thanks for your answer.

What are those “transformations”?

Let’s say that during deployment, following things happen on Netlify:

  1. The main branch of the repository with Hugo sources is checked out.
  2. A program is called which generates content and puts it into the public folder. Some content (HTML) is generated from the sources, some is just copied (binary files like PDFs and images).
  3. The contents of the public folder are published.

The site in question is 100% static.

Am I using transformations here?

Thanks

No you’re not using any transformations.

From Netlify docs:

  • Transformations when you need them – With our image transformation service, you can serve the exact image size you need for each context, from thumbnail to retina, without having to save multiple versions or run repetitive resizing operations in your build.

And Hugo already has amazing in-built image processing. So, chances are, you won’t need Netlify LFS ever. The one time you might need it is when your repo size goes beyond the permitted repo size on Bitbucket, for example, on GitHub, the limit is 2 GB, I suppose.

1 Like