Lepozepo / cloudinary

MIT License
94 stars 42 forks source link

How to use transformations with React #74

Open hyperh opened 8 years ago

hyperh commented 8 years ago

To get a transformed image, the docs say to do it like this: <img width="250" src="{{c.url public_id effect='blur:300' angle=10}}">

This uses the helper c. If I'm using React, how would I get a transformed image? I tried Cloudinary._helpers.url('public_id', {effect:'blur:300', angle:'10'}) But I only get http://res.cloudinary.com/dmwby0n3f/image/upload/public_id

Secretmapper commented 8 years ago

You're passing public_id as a string. Remove the ' (quotes) in public_id and it should work

osterkraft commented 7 years ago

@hyperh did you get it to work, or is it actually an issue with this module and React? I could only retrieve the default image without any transformation, just like you explained.

hyperh commented 7 years ago

@osterkraft I'm no longer working on the project that used this library, so unfortunately I can't help you out. Best of luck.

Nisthar commented 7 years ago

@osterkraft I tried it from my console and its working for me.