Media Handling
Configure media storage for images, files, and other assets in TinaCMS
TinaCMS provides flexible media handling for images, documents, and other files. Choose a storage backend that fits your needs.
Storage Options
| Backend | Best For | Key Benefits |
|---|---|---|
| Git Repository | Small teams, simple setup | Version controlled, no external services |
| Cloudinary | Image-heavy sites | Transformations, CDN, optimization |
| AWS S3 | Enterprise | Full control, scalable |
| DigitalOcean Spaces | S3-compatible | Simple, affordable |
Quick Comparison
Git Repository (Default)
Best for getting started. Media stored directly in your repo — no external services needed.
Configure via media.tina in your TinaCMS config:
// tina/config.ts
export default defineConfig({
// ...
media: {
tina: {
mediaRoot: 'public',
publicFolder: 'public',
},
},
})Cloudinary
Automatic optimization, on-the-fly transformations:
import { TinaCloudCloudinaryMediaStore } from 'next-tinacms-cloudinary'
export default defineConfig({
// ...
media: {
loadCustomStore: async () => {
const pack = await import('next-tinacms-cloudinary')
return pack.TinaCloudCloudinaryMediaStore
},
},
})AWS S3
Full control, enterprise-grade:
import { S3MediaStore } from 'next-tinacms-s3'
export default defineConfig({
// ...
media: {
loadCustomStore: async () => {
const pack = await import('next-tinacms-s3')
return pack.S3MediaStore
},
},
})DigitalOcean Spaces
S3-compatible, cost-effective:
import { DOSpacesMediaStore } from 'next-tinacms-dos'
export default defineConfig({
// ...
media: {
loadCustomStore: async () => {
const pack = await import('next-tinacms-dos')
return pack.DOSpacesMediaStore
},
},
})Media Library UI
The TinaCMS media library provides:
- Browse — View all uploaded files
- Upload — Drag-and-drop or click to upload
- Delete — Remove unused files
- Search — Find files by name
- Folders — Organize into directories
Access via the sidebar in the TinaCMS editor.
Custom Storage
Need to integrate with a storage provider not listed here? Implement the MediaStore interface:
import { MediaStore, MediaUploadOptions, Media } from 'tinacms'
export class CustomMediaStore implements MediaStore {
accept = '*'
async persist(files: MediaUploadOptions[]): Promise<Media[]> {
// Upload files and return media objects
}
async list(options): Promise<MediaList> {
// Return list of media files
}
async delete(media: Media): Promise<void> {
// Delete a media file
}
}Conversion Pipeline
The Conversion Pipeline is a modular system designed to handle the transformation of content between various formats (e.g., MDX, Markdown, YAML, JSON, TOML).
TinaCMS Packages
TinaCMS offers a rich ecosystem of packages, categorized into core, asset management, and development tools, each serving distinct purposes. Here’s a high-level summary of the main and auxiliary packages, with a focus on the latest updates, key maintainers, and package functionalities: