Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions skills/sanity-best-practices/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ Reference these guidelines when:
- Model relationships with `reference` fields, then resolve related documents with GROQ lookups, source-key fields, or returned `_id` values from created documents.
- Use explicit document IDs mainly for singleton documents controlled by Studio Structure, including localized singletons such as `homePage-en`.

## Video

- Do not store or serve video from Sanity `file` assets for production playback. File assets are delivered as raw downloads with no transcoding or adaptive streaming, and video traffic drives very high bandwidth usage and unexpectedly large bills.
- Use a dedicated video service instead: install `sanity-plugin-mux-input` to upload and stream video directly from the Studio, or host video on a platform such as Mux, YouTube, or Vimeo and store only the playback ID or embed URL in Sanity.
- Small clips and short previews in a `file` field are acceptable, but any user-facing video at scale must go through a streaming service.

## Quick Reference

### Integration Guides
Expand Down