Skip to main content

Deliver an Image from a folder using the Javascript SDK

Comments

1 comment

  • Aleksandar Kostadinov

    Hi George,

    Any resource within one or more folders will have the full path to the resource as its public_id. For example, if you had an image sample.jpg under the folder userPhotos then its public_id would be userPhotos/sample.jpg.

    You can then use the url method just like the original example but only updating it to use the new public_id:

    cl.url("userPhotos/sample.jpg", { width: 400, crop: "pad"});

    Could you try this with one of the images in your account that is in a folder?

    Let me know how this goes and if you have any further questions.

     

    Best regards,

    Aleksandar

    0

Post is closed for comments.