#Getting hold of UmbracoFile properties

1 messages · Page 1 of 1 (latest)

rocky willow
#

On this MediaWithCrop, what would be the correct syntax to get hold of this property called umbracoWidth in the image below:

cloud cove
#

mainImage.Content?.Value<int>("umbracoWidth")
Or

If(mainImage.Content is Image image)
image.Width

rocky willow
#

Thanks 🙂

cloud cove
#

As Content is IPublsihed content has to be typed for Modelsbuilder as in theory it could be an svg

#

Etc

#

Also there is 99% of typos am on my phone

rocky willow
#

I'm just trying to pull out the height and width to put in a Slimsy Tag Helper that's in an Image Block, so could be any image, lol But I do like to have a srcset 🙂