Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Have your own Lake of Assets

说明与用途

AssetLake 允许在 Sanity 项目内完全使用公共图像上传、变换和 CDN 缓存,消除了单独对象存储、CDN 和图像服务的需求。

问题

Railway’s storage buckets are private and public buckets are not supported, so every image read requires a presigned URL or a backend proxy. Using a separate object storage and CDN adds another provider, DNS surface, and requires building resizing, format negotiation and per‑image metadata.

结果

AssetLake enables public image uploads with transforms and CDN caching entirely within a Sanity project, eliminating the need for separate object storage, CDN, and image service. It provides a backend‑only write boundary, live asset console, and policy‑driven uploads.

工作流

  • 1. Browser uploads image to authenticated backend route handler.
  • 2. Backend calls @assetlake/core to validate policy and upload to Sanity.
  • 3. @assetlake/core creates an assetLakeImage document linking to the Sanity asset.
  • 4. Browser requests image variants via cdn.sanity.io URLs.
  • 5. AssetLake Console displays live asset list and preset editing via Sanity App SDK.

证据

Railway's storage buckets are private. Public buckets aren't supported, so every image read means a presigned URL or a proxy through my backend.

来源

I already use Sanity for content, and a Sanity project already ships an asset store, an image pipeline, a global CDN, structured documents and realtime APIs.

来源

AssetLake is my answer: @assetlake/core, a framework‑neutral server SDK. My backend calls assetLake.images.upload(...). It checks the file against a policy stored as Sanity content (allowed types, size, magic bytes, dimensions), uploads it as a Sanity asset, and creates a structured assetLakeImage record: owner, purpose, status.

来源

Browsers load every variant straight from cdn.sanity.io. My backend is the write and auth boundary, never an image proxy.

来源

  • 记录日期: 2026-10-05T01:41:05.172Z