Can the NodeJS API wrapper return only the URL?

Comments

4 comments

  • Avatar
    Itay Taragano

    Hi,

    You can use cloudinary.url instead of cloudinary.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"

    0
    Comment actions Permalink
  • Avatar
    Forrest Maready

    Thank you very much! I should have guessed there was a method for this. Many thanks!

    0
    Comment actions Permalink
  • Avatar
    john lois frades

    Hi thanks for this! also i want to ask, is there a way to return https url in cloudinary.url?

     

    THank you!

    0
    Comment actions Permalink
  • Avatar
    Roee Ben Ari

    You can generate an HTTPS URL by setting `secure` to `true`. For example:

    cloudinary.url("sample", {width:300, height: 300, secure: true})

    0
    Comment actions Permalink

Please sign in to leave a comment.