Docs: Media library
Media library
The media library: folders, tags, month folders, files added by FTP and what happens to a missing file.
Every file you upload is kept in the media library, with its folder, tags, alt text and caption. Open it under Media in the admin panel. It has the tabs Library, Folders, Tags and Settings, and the picker in every editor offers the same folders and tags. Folders, tags and month folders arrived in 1.19.0.
Folders and tags #
- Put a file in one folder, and give it as many tags as you like. A file with no folder is Unfiled.
- Deleting a folder does not delete its files: they move to Unfiled.
- Merging a tag moves its files to the tag you keep.
- A name that another folder or tag already holds is refused.
Month folders #
A new upload goes into a folder for its month, such as uploads/media/2026/10/. So do an image you approve from a draft and an image the importer brings in. Files that were already there stay where they are.
The old flat address, /uploads/media/photo.jpg, still works for a file that moved into a month folder: Tilspire answers with a permanent redirect to the real address. On nginx that needs one optional rule; see Requirements.
Files added by FTP #
A file you put into the uploads folder by hand gets a place in the library, in Unfiled. Tilspire notices it when you open the library, and a daily job checks again. A file that was changed in the last few seconds waits for the next check.
A file that goes missing #
If a file disappears from the disk, its entry is hidden from the library, the picker and the Operator API, and Health says so. If the file comes back, it returns with its folder, tags and alt text intact. An entry whose file stays missing for 30 days is removed.
Protected files #
Some files must never have a public address, such as ticket attachments. They live in their own protected store, uploads/private, and not in the library, so they never appear in it or in the picker. The site hands one out only to a reader who is allowed to see it. The off-site backup carries them, because they are inside uploads. On a host that ignores .htaccess, Health shows the folder amber since 1.20.2: a file opens only with its exact address, and the folder cannot be listed. The nginx rule in Requirements is the full lock, optional, for whoever manages the server.
Deleting #
Since 1.21.0 deleting a file moves it to the site's recycle bin instead of removing it. Nothing is gone at the click: the file and its WebP copy are kept, and the file leaves the library, the picker and the Operator API. A delete's confirmation names the bin and the days. The library has a Deleted (n) link that opens the bin on media. Before 1.21.0 a deletion removed the file, its resized copies and its entry at once.
- Restore brings the file back under its old id and address, with its WebP copy. It is refused, and the file stays in the bin with a reason, if the file on the disk is gone or a different file has taken its name.
- The file is deleted for good when the keep period ends (30 days by default, from 1 to 365), or earlier by someone with the permission to delete from the bin for good.
- A deletion proposed through the Operator API still waits in the Review queue for a person. Approving it moves the file to the bin, as that person, and a restore is a proposal a person approves too. A credential can never delete for good, empty the bin or change the keep period.
Settings #
The Settings tab holds the media settings, including the largest upload (in MB), the largest image size, two quality settings (the original, and the lighter WebP copies phones download), whether alt text is required, whether file names are tidied (lower case, hyphens), the library's default view, files per page and the size an image gets when inserted into text. Like every Settings page, it has a permission of its own.
The importer and the Operator API #
The importer and the Operator API use the library too. The API can list files, filtered by folder, tag or a word in the name, and list the folders and tags with their counts. Its media list is ordered by id and pages with a numeric cursor, so an integration written before 1.19.0 starts its listing again.
Since 1.21.0 the importer's Undo sends what it removes to the recycle bin, and the new Export page includes the media files in its full archive. See The importer and Export.
Since 1.20.2 each file the importer brought in also answers its old address with a permanent redirect to its new one, so links from elsewhere to the old site's images keep working. A switch in Settings ▸ SEO, on by default, turns it off. See The importer.