From 578b19376941f77812120916a36a483964fa0ec8 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 15 Jul 2026 17:27:23 +0000 Subject: [PATCH 1/2] Add video hosting guidance to sanity-best-practices Users keep serving video from Sanity file assets in production, which delivers raw downloads with no adaptive streaming and leads to very high bandwidth usage. Add a Video section to the skill's global guidance: use sanity-plugin-mux-input or an external video platform and store only the playback ID or embed URL in Sanity. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01Siwz2hh1ZJdWfqnZZhQ9T1 --- skills/sanity-best-practices/SKILL.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/skills/sanity-best-practices/SKILL.md b/skills/sanity-best-practices/SKILL.md index ed5a331..cbfa167 100644 --- a/skills/sanity-best-practices/SKILL.md +++ b/skills/sanity-best-practices/SKILL.md @@ -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 From 78886ddb9d464b22dadb3e73fdcab60077433161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Melv=C3=A6r?= Date: Tue, 28 Jul 2026 12:28:32 -0700 Subject: [PATCH 2/2] docs(skill): recommend Media Library video on Enterprise plans Address PR feedback: Media Library supports transcoded, adaptively streamed video (via Mux), but only as a paid add-on on certain Enterprise plans. Recommend it first for those plans, and clarify that sanity-plugin-mux-input uploads/manages videos in your own Mux account rather than streaming from the Studio. Co-Authored-By: Claude Fable 5 --- skills/sanity-best-practices/SKILL.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/skills/sanity-best-practices/SKILL.md b/skills/sanity-best-practices/SKILL.md index cbfa167..dbef6df 100644 --- a/skills/sanity-best-practices/SKILL.md +++ b/skills/sanity-best-practices/SKILL.md @@ -33,8 +33,9 @@ Reference these guidelines when: ## 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. +- On Enterprise plans with the video add-on, use Sanity Media Library for video: uploads are transcoded and streamed adaptively via Mux. Model video fields with `defineVideoField()` from `sanity/media-library` and play them with `@mux/mux-player-react` using the asset's playback ID. +- On other plans, use a dedicated video service: install `sanity-plugin-mux-input` to upload and manage videos in your Mux account from the Studio, or host video on a platform such as YouTube or Vimeo and store only the 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 Media Library or a streaming service. ## Quick Reference