Hi, @mfan, I believe I’ve already replied to a parallel inquiry via another channel but I want to share the same information publicly here for anyone else running into this issue.
There are two environment variables which control if and which files get the actual binary file contents downloaded instead of the Git LFS pointers (which is the default for a git clone
).
The first is GIT_LFS_ENABLED=true
. This determines if the git clone
at Netlify will even attempt to download the actual files instead of their text pointers.
However, the second environment variable is not well documented (yet as I have a created feature request to update our public documentation to include this). This second environment variable is the GIT_LFS_FETCH_INCLUDE
environment variable.
The current defaults for this are:
GIT_LFS_FETCH_INCLUDE=*.jpg,*.png,*.jpeg,*.svg,*.gif,*.pdf,*.mp4,*.bmp
This can really only be found here (for now as I’ve opened an issue to get our public docs updated to include this):
To override these defaults (and download the Webm files in addition to the MP4s), please create a new environment variable which includes all types of file you want to download. For example, you can just add *.webm
to the current list with this environment variable:
GIT_LFS_FETCH_INCLUDE=*.jpg,*.png,*.jpeg,*.svg,*.gif,*.pdf,*.mp4,*.bmp,*webm
I’m not 100% but I do suspect the filtering is case-sensitive based on this:
So, please do include all required case variations.
To summarize, the solution for this will be to include both environment variables at Netlify for this site. Note, these environment variables must be defined in the Netlify web UI for the site. If you defined them in netlify.toml
they are in the repo and won’t be used during the git clone
because we need to clone the repo in order to see the environment variables. This is why they must be defined in the UI.
If there are other questions about this, please let us know.