The Media Library allows content editors to easily manage the media for your site. This allows content editors to easily add images, PDFs, and GIFs to their content without having to use Git.
To upload media files to the Media Library, navigate to the Media Library page in Forestry, and follow these instructions:
- Click the “+” thumbnail
- Select a media file to upload from your local machine
- A loading spinner will be displayed while the media file uploads
You can also upload media files by dragging them from your desktop onto the Media Library. Give it a try!
To delete media files, navigate to the Media Library page in the CMS, and follow these instructions:
- Click “Select” on the thumbnail of each upload you’d like to delete
- Click the trash icon in the top right corner of the page
- You can confirm that each upload is being deleted by checking Site Activity in the top right of the sidebar
Configuring the Media Library
You can configure the paths used for your media files in the Media Paths section of your site settings.
The directory where media uploads should be saved, relative to the root of your repository.
The URL path that maps to your upload directory. For example, a Hugo website might use
static/uploads as the upload directory, and
/uploads as the public path since Hugo copies files placed in
static directly into the root of the published website.
This value will be appended to both your upload directory and public path. You can use this setting to specify a subfolder to place your uploads in. You may use the following variables as a way of bucketing your uploads:
:year:: the current year, formatted
:month:: the current month, formatted
:day:: the current day, formatted
Front Matter Path
You may optionally use a different public path for images uploaded to front matter, as opposed to images uploaded via the content editor. You may wish to do this if you already have the public path value written into your templates where the front matter is used.
Caught a mistake or want to contribute to the docs? Edit this page on Github!