惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

小众软件
小众软件
A
About on SuperTechFans
博客园 - Franky
Engineering at Meta
Engineering at Meta
Recent Announcements
Recent Announcements
云风的 BLOG
云风的 BLOG
B
Blog
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
U
Unit 42
Martin Fowler
Martin Fowler
Y
Y Combinator Blog
Stack Overflow Blog
Stack Overflow Blog
博客园 - 叶小钗
Vercel News
Vercel News
Apple Machine Learning Research
Apple Machine Learning Research
The Cloudflare Blog
Last Week in AI
Last Week in AI
腾讯CDC
Microsoft Azure Blog
Microsoft Azure Blog
爱范儿
爱范儿
V
V2EX
G
Google Developers Blog

Sanity.io

A Board Game agent built using Sanity Context and Vercel's AI SDK | Sanity Build a prototype with Claude Code that your whole team can edit | Sanity What’s New - May 2026 | Sanity I built a London pub guide with v0 and the Sanity MCP in six hours. Here's what I learned. | Sanity Build a conference concierge with Agent Context and Anthropic | Sanity Build a content-aware Telegram agent with Vercel AI SDK and Chat SDK | Sanity How I used Agent API to generate photos for my family’s recipes | Sanity What’s New April - 2026 | Sanity Better context, better matches: An AI love story (for dogs) | Sanity How to write for an agent | Sanity Content Agent, meet Slack: AI content operations in your workflow | Sanity Structure powers intelligence | Sanity Your agent needs better content. Here's how to give it. | Sanity How to serve content to agents (a field guide) | Sanity Sanity TypeGen GA: Automatic TypeScript types for content and GROQ | Sanity Sanity is now available on the Vercel Marketplace | Sanity The logo soup problem (and how to solve it) | Sanity Content Releases: From scattered updates to coordinated publishing | Sanity What's New - February 2026 | Sanity How we solved the agent memory problem | Sanity v0 Builder Challenge: The winners | Sanity Introducing: Sanity Agent Skills | Sanity Content Agent: Days of work in one conversation | Sanity Our Sanity Values | Sanity Open Source Pledge 2025: Stepping up when it matters | Sanity v0 builder challenge: $3000 in prizes | Sanity Why AI Breaks Without Structured Content Operations | Sanity What’s New January - 2026 | Sanity BFCM 2025: What teams built when infrastructure stopped being the problem | Sanity How AI shaped holiday shopping and what it means for content in 2026 | Sanity
Assets
Knut Melvær, · 2017-11-13 · via Sanity.io

Content Lake (Datastore)

Sanity provides extensible UI for managing assets, and an API for dealing with storage, resizing and deletion.

Assets are files, such as images, PDFs, and other media, that exist alongside your structured content in Sanity. Studio and Media Library provide intuitive interfaces for uploading assets, while the image pipeline offers powerful tools for manipulation.

With Sanity's asset management, you can:

  • Upload, store, and manage various file types, including images, documents, audio files, and more.
  • Transform images on the fly with parameters for resizing, cropping, and format conversion.
  • Extract metadata from images, including color palettes, camera information, and location data.
  • Deliver content globally through Sanity's high-performance CDN.

For details on how to display images, see Presenting images.

Core concepts

Sanity's asset system is built around several key concepts that work together to provide a complete solution for managing digital assets.

Asset types

Sanity currently supports two primary asset types:

  • Image assets: For many kinds of images including JPG, PNG, WebP, SVG, TIFF, GIF, HEIF, AVIF (8-bit), and more.
  • File assets: For all other file types such as PDFs, audio files, videos, documents, and archives.

Video assets

Content Lake treats video assets as files. If you'd like additional options, like streaming, for your video assets you have a few choices:

Image pipeline and asset CDN

The image pipeline allows you to transform images on-the-fly by appending query parameters to image URLs. This enables resizing, cropping, format conversion, and other manipulations without creating multiple versions of the same asset.

All assets in Sanity are served through a global content delivery network (CDN). This ensures fast loading times for users worldwide. Assets are cached indefinitely based on content hashes, meaning any content changes generate new URLs automatically. Combined with the image pipeline, it can cache specific transformations of your images.

Asset metadata

Images in Sanity can include rich metadata that's generated from the file during upload:

  • Always included: Dimensions, transparency information (hasAlpha, isOpaque).
  • Included by default: Placeholders (lqip, blurHash) and color palette information.
  • Optional: Camera data (exif) and location information.

This metadata can be used to enhance your application with features like color-based search, loading placeholders, or location-based filtering. Your schema defines which metadata is included in the asset document.

Managing assets

Depending on your team's needs, you can manage assets in multiple ways.

For single project, smaller teams that just only need the occasional image or file linked in a document, you can upload straight from Studio. The Media Plugin is also available for further control.

For organizations requiring centralized asset management across multiple projects, Media Library enables teams to create custom groupings, filter and sort, and maintain a single source of truth for all assets.

For programmatic control, you can query asset documents directly using GROQ. All assets are represented as documents in your dataset (or Media Library's dataset) with types like sanity.imageAsset or sanity.fileAsset. You can search, filter, and manipulate them through the Query API just as you would with other document types. Learn more in the Upload, query, and delete assets guide.