This should be very simple, and yet I seem to run into the same wall all the time. There are many examples, but why can't I get them to work??? Well, here goes:
Now, the 1069 is the right id for the selected image. What am I missing??? Pretty sure it's omething obvious, but in my searches around the web no hits explains why I can't get it to work.
I had this happen to me as well, took me for ever to figure this out, when I was working with it. I believe your problem is you are not defining the page it is stored/coming from.
for instant if the crop part of the url is happening in the media section, you have to access the Media content before grabbing the crop.
Url.GetCropUrl(node image is stored against, "Alias name for the cropper", "Crop type alias setup against the cropper")
This may not be your problem, but I hope it helps.
Image cropper, MVC
This should be very simple, and yet I seem to run into the same wall all the time. There are many examples, but why can't I get them to work??? Well, here goes:
These are three examples I've found that should output the url for the image - first and third with crop data. However, the output is as follows:
Now, the 1069 is the right id for the selected image. What am I missing??? Pretty sure it's omething obvious, but in my searches around the web no hits explains why I can't get it to work.
Can anyone help?
I would just type in the query strings myself
Hey Bruno,
I had this happen to me as well, took me for ever to figure this out, when I was working with it. I believe your problem is you are not defining the page it is stored/coming from.
for instant if the crop part of the url is happening in the media section, you have to access the Media content before grabbing the crop.
This may not be your problem, but I hope it helps.
Hi Bruno,
I think it is because you have a media picker, first you need to get the media item from the picker, then the crop.
e.g.
Or with Umbraco v7.4+ using the UrlHelper it would be:
I hope that helps you work it out?
Jeavon
Hi Jeavon
That did indeed make a difference :)
By renaming the mediaItem variable in your example I got it working.
Thanks for your help :)
And thank you Paul and Jordan for wanting to help :)
/Bruno
Hi Bruno,
Great it's working for you, I hope you understand now why it wasn't before?
I'm not sure I understand what you mean about renaming mediaItem?
Jeavon
is working on a reply...