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

推荐订阅源

The GitHub Blog
The GitHub Blog
IT之家
IT之家
B
Blog RSS Feed
罗磊的独立博客
GbyAI
GbyAI
博客园 - Franky
Y
Y Combinator Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
博客园 - 聂微东
N
Netflix TechBlog - Medium
博客园 - 三生石上(FineUI控件)
人人都是产品经理
人人都是产品经理
U
Unit 42
博客园 - 叶小钗
Jina AI
Jina AI
MyScale Blog
MyScale Blog
雷峰网
雷峰网
B
Blog
Hugging Face - Blog
Hugging Face - Blog
Blog — PlanetScale
Blog — PlanetScale
Recent Announcements
Recent Announcements
腾讯CDC
酷 壳 – CoolShell
酷 壳 – CoolShell

The Astro Blog

Astro 6.4 Astro 6.3 Starlight 0.39 Astro 6.2 What's new in Astro - April 2026 What's new in Astro - March 2026 Astro 6.1 CloudCannon Joins Astro as an Official CMS Partner Astro 6.0 What's new in Astro - February 2026 What's new in Astro - January 2026 Astro 5.17 Supporting the future of Astro The Astro Technology Company joins Cloudflare Astro 6 Beta What's new in Astro - December 2025 What's new in Astro - November 2025 Astro 5.16 Stainless Sponsors Astro, Launches Astro-Powered Docs Platform What's new in Astro - October 2025 Astro 5.15 Spirit of Astro: meet the winning designs What's new in Astro - September 2025 Astro 5.14 Cloudflare Donates $150,000 to Support Astro's Open Source Mission Webflow Donates $150,000 to Support Astro's Open Source Mission Mux: Our Official Video Partner Unleashing creativity: How CodeTV built a video streaming platform with Astro and Mux | Astro What's new in Astro - August 2025 Astro 5.13
Astro x Cloudinary: Content Loader
Matthew Phillips · 2024-09-19 · via The Astro Blog

We are thrilled to announce Cloudinary as a launch partner for the Astro Content Layer API, our new approach to bringing external content into content collections. Cloudinary is a hosting platform for media assets that allows you to transform and optimize media types.

Content collections are Astro’s answer to organized, managed, type-safe content. Now with Astro’s content layer, you can bring in all different types of content and data from external sources during the build. The Content Layer API efficiently syncs and caches the content, giving you a familiar, unified experience for working with any data source.

Using the Cloudinary loader

To use the new loader, first install the astro-cloudinary package from npm:

npm install astro-cloudinary

Next, you’ll need to configure your environment with your API key. See the Cloudinary loader configuration guide for details.

Then import and use the loader inside of your src/content/config.ts configuration file:

import { defineCollection } from 'astro:content'

import { cldAssetsLoader } from 'astro-cloudinary/loaders'

const samples = defineCollection({

loader: cldAssetsLoader({

limit: 4,

folder: 'samples/food'

})

})

export const collections = { assets }

And that’s it! From here, you can query and use collections the same way you would for local collections. See the Astro docs content collections guide to learn more.

For more reading on using the Cloudinary loader, go read Source Cloudinary Assets in Astro With the Astro Content Layer which has additional details. Also check out yesterday’s deep dive on the new Content Layer API to learn how loaders work, and how you can build your own.