Getting Started with cldAssetsLoader
The Cloudinary Assets Loader allows you to query your Cloudinary images, videos, and other resources using the Astro Collections.
Basic Usage
cldAssetsLoader
allows you to specify exactly which assets you’d like to
query and store in an Astro Collection, including a folder and how many
assets in total you would like to request.
Start by defining a new Collection with defineCollection
:
Getting Assets from a Collection
You can use getCollection
to retrieve your assets:
By default, using cldAssetsLoader
will query the assets in the root of your
Cloudinary account, but you can customize the request with options depending
on the assets you want to find.
Getting a Single Asset from a Collection
You can use getEntry
to retrieve a single asset: