Cloudinary and angular-carousel
Hi,
I am trying to integrate cloudinary with angular-carousel.
The problem is that angular-carousel is waiting for url's and cloudinary is giving images.
How can I make this work? Is there a wait to retrieve urls the same way we retrieve imgs (with all options that cl-image offers).
Or is there another way to display a carousel from cloudinary Ids ?
More code details here: https://github.com/revolunet/angular-carousel/issues/144
Thank you.
-
Hi,
Based on a public ID of an image, you can build URLs, either by manually building your URL, or by using our jQuery plugin.
For example, you can use the following code for generating an img tag:
$.cloudinary.image("sample.jpg", { width: 100, height: 150, crop: 'fill' });
Output:
<img width="100" height="150" src="http://res.cloudinary.com/<your\_cloud\_name>/image/upload/c_fill,h_150,w_100/sample.jpg"/>
Or use the following to return the URL:
$.cloudinary.url("sample.jpg", { width: 100, height: 150, crop: 'fill' });
Output:
"http://res.cloudinary.com/demo/image/upload/c_fill,h_150,w_100/sample.jpg"
Do you use the community contributed Angular module of Cloudinary? If you do, it seems to miss a method for returning URLs, but it seems simple to add: https://github.com/jbcpollak/cloudinary_angular/blob/master/js/angular.cloudinary.js#L23
You can create a pull request, or contact the maintainers.
0
Post is closed for comments.
Comments
1 comment