cloudinary-community / next-cloudinary

⚡️ High-performance image delivery and uploading at scale in Next.js powered by Cloudinary.
https://next.cloudinary.dev
MIT License
237 stars 64 forks source link

How to list assets from Cloudinary on a page #445

Open imaxisXD opened 4 months ago

imaxisXD commented 4 months ago

How can a user get the images in systematic manner that they are stored

For example, I have uploaded images in a folder in order 1.png, 2.png etc

Now on the frontend, I want to get the images in the order that I stored

for(i=0;i<7;i++) { Image src = {/image/${i}.png } }

How can we achieve this ?

colbyfayock commented 4 months ago

hey @imaxisXD typically people will use the Node.js SDK (or backend SDK) to fetch resources serverside and feed them to the UI, such as:

there's also a feature that allows you to fetch a list of assets by tag from an endpoint, which you can do clientside, but the assets require the tag and you need to enable that feature under the Security tab of settings

https://cloudinary.com/documentation/list_assets