Can the NodeJS API wrapper return only the URL?
Is there a way in the Cloudinary Node.js wrapper to get only the URL, rather than the entire <img src=''http://cloudinary.com/4eroigwje9rgjwe9rj.jpg" width=100/> string?
I can split it off via Javascript- just wondering if there was a method for doing this.
Thanks
-
Hi,
You can use
cloudinary.url
instead ofcloudinary.image
, this method receives the exact same arguments, but returns just the image URL instead of the actual image tag.For example:
cloudinary.url("sample.jpg", { width: 100, height: 150, crop: 'fill' })
will return:
"http://res.cloudinary.com/<your\_cloud\_name>/image/upload/c_fill,h_150,w_100/sample.jpg"
Post is closed for comments.
Comments
4 comments