when I upload an image to cloudinary, I save the URL to my database like this:
but then if I want to create a variation of that image (resized, for example), I have to somehow modify that URL to include 'w_200` right before the '/v160../' part.
Not very easy, but I have a helper method that can parse existing transformation options inside any cloudinary url (if any), and modifies them right on the fly.
But I was wondering if there was an easier way to do this.
I found cloudinary_url method:
but that just returns back the same URL without any modifications that I would expect...
now of course the obvious solution would be to save other pieces of data from the upload response, like public_id and version_id, and use those to easily construct any transformation URL that I want at anytime.
But is this the only way or even the best way? How do people typically store references cloudinary assets?
Please sign in to leave a comment.