简体   繁体   中英

Genearate Cloudinary image url without using the libs

First of all I am totaly new to Cloudinary and I pretty like the way it makes the image management way easier. That's why I decided to get more info about this service.

I would like to know if it is possible to generate my images url on my own with only the public_id without using the cloudinary libs?

Like this:

http://res.cloudinary.com/{{myCloud}}/image/upload/{{formatIWant}}/{{public_id}}.png

May I go through futurs problems if I generate my url this way ?

Thanks in advance

Yes, sure. Cloudinary generates the images based on the request as given by the URL itself. The client libraries can ease the URL generation, but you can indeed build the URL by yourself. Note that the URLs must be of a specific convention and order, as long as you keep that, you're good to go.

I had the exact same problem as you Marc, and we decided to roll our own library for it. The only thing it does is transform transformations and public_id into a Cloudinary url.

https://github.com/esbenp/cloudinary-url-resolver

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM