Platform
Learn
Developer docs User guide Quickstart Blog
Company
Services About Contact Links Get started

The media library

Updated

The media library holds every file uploaded to your site: images, documents, video, theme assets and exported CSV files. You use it to upload files, to copy the snippet that puts a file into a template, and to check where a file is used before you delete it.

What you need

  • The Manage Media permission. Without it, Media is missing from the sidebar and the page shows a permission message.
  • A configured file storage. By default files are stored on the server's disk; your administrator can switch to a cloud provider. See File storage.

Upload files

  1. Click Media in the sidebar (it is in the Content group).
  2. Click Upload files. An upload area opens.
  3. Drag files into it, or click to browse. The area states the maximum file size. Administrators can limit file size and allowed file types on the server; see File storage.
  4. Wait for the message Upload complete.

Files you upload anywhere else in the admin, for example with an Attachment field or the Image and File buttons of the rich text editor, are stored in the same library.

Find a file

  • Type in Search files to search by file name.
  • Use the type buttons to narrow the grid: All, Images, Video, Audio, Documents or Text.
  • Use the paging controls under the grid when there are many files.

Open a file

Click a file in the grid to open its page. It has four parts:

  • Details: File name, Type, Size, Uploaded, Storage (which provider holds it) and the Object key, with a copy button. The object key is the file's internal name, and templates identify the file by it.
  • Use in a template: two ready-made snippets, described below.
  • Where it is used: the themes that include the file and the web templates that mention its object key.
  • Delete file: the danger zone.

Put a file into a template

The Use in a template card gives you a snippet to paste into a Liquid template. Pick the one that fits:

SnippetWhat it gives youUse it for
Public URLThe file's direct addressImages, stylesheets and scripts, when your storage is public
Redirect URLA Raytha link that redirects to the fileFiles on private cloud storage, and downloads

The snippets look like this, where the long text is the object key:

<img src="{{ "5f2c9a1d-logo.png" | attachment_public_url }}" alt="Our logo">
<a href="{{ "5f2c9a1d-brochure.pdf" | attachment_redirect_url }}">Download the brochure</a>

Copy the snippet from the card rather than typing the key. For an image field on a content item, you do not need the library at all: in a template the field's .Value is the object key, so you pass that to the same filter, for example {{ Target.PublishedContent.featured_image.Value | attachment_public_url }}. See How Liquid templates work in Raytha.

Delete a file

  1. Open the file.
  2. Check Where it is used. If a template mentions it, edit the template first.
  3. In the Delete file danger zone, click the delete button and confirm.

Warning Deleting removes the file from storage. Where it is used checks themes and web templates only. It does not search content items, so an image attached to a post can still be in use even when the list is empty. Pages that point at a deleted file show a broken image or a dead link.

Theme assets

Files that belong to a theme, such as its logo and stylesheet, are also listed here. You can manage them from the theme's Assets tab, which adds an Upload assets button and a copy button for each snippet. See Themes and web templates.

Gotchas

  • Exported CSV files land here. They stay until you delete them.
  • File names are not unique keys. Two files may share a name. Templates use the object key, which is always unique.
  • Public URL on private storage will not work for visitors. Use Redirect URL there.

Next steps