Storing Uploads With Netlify Large Media
Forestry can integrate with Netlify Large Media for storing your uploads. Netlify Large Media is a Git LFS target, enabling you to seamlessly incorporate large media files in your repository without the performance penalty that this usually requires.
For more information on Git LFS, view our blog post: Versioning Large Files with Git LFS.
Getting Started With Netlify Large Media
Before setting up Netlify Large Media on your site, ensure you have successfully deployed your site to Netlify. From there, you will want to clone your repository to your local machine to set up Netlify Large Media via Netlify’s CLI tool. Follow the steps outlined in Netlify’s Large Media Documentation to complete the set up.
Connecting Large Media to Forestry
Once you have successfully configured Netlify Large Media on your repository, you will need to configure your media library on Forestry to use it.
Go to Settings > Media on your Forestry site, and change your Media Storage Provider setting to Netlify Large Media.
Your upload directory should remain the same, so re-enter the upload directory you were using previously. The public path should be the URL to the media file on your Netlify site. This will be your original public path prepended with the URL to your Netlify site.
Beneath the path fields, click the Connect to Netlify button to connect Forestry to Netlify in order to authenticate the media library.
Once you have successfully connected to Netlify, you will see the Connected message on the settings page.
Usage with Instant Previews
If you’re using Instant Previews with Netlify Large Media, you will need to skip the LFS file download when your preview runs. To do this, add an environment variable to your instant preview environment with the key of
GIT_LFS_SKIP_SMUDGE and a value of
Using Netlify’s Image Transformations
Using Netlify Large Media, you can create image transformations by appending parameters to the image URL. For documentation and examples, check out Netlify’s image transformation docs.
Caught a mistake or want to contribute to the docs? Edit this page on Github!