I want to display a cropped image, but it doesn't work.
This is what I do:
var node = new umbraco.MacroEngines.DynamicNode(
ConfigurationManager.AppSettings["nodeID_News"].AsInt()
);
foreach (dynamic newsNode in node.Children()) {
if (newsNode.HasValue("image")) {
var imageUrl = newsNode.GetCropUrl("image", "newsOverview");
<img src="@imageUrl">
}
}
newsNode.image has a value, because I see the <img> tag getting rendered.
And when I put a watch on newsNode.image, it shows me the following:
Getting the cropped image doesn't work
I want to display a cropped image, but it doesn't work.
This is what I do:
newsNode.image has a value, because I see the <img> tag getting rendered. And when I put a watch on newsNode.image, it shows me the following:
So there is a crop and a media item available. But still, GetCropUrl returns a {}
What am I doing wrong here?
is working on a reply...