On this MediaWithCrop, what would be the correct syntax to get hold of this property called umbracoWidth in the image below:
m
Matt Wise
07/24/2023, 9:40 PM
mainImage.Content?.Value("umbracoWidth")
Or
If(mainImage.Content is Image image)
image.Width
c
Craig100
07/24/2023, 9:41 PM
Thanks 🙂
m
Matt Wise
07/24/2023, 9:42 PM
As Content is IPublsihed content has to be typed for Modelsbuilder as in theory it could be an svg
Matt Wise
07/24/2023, 9:42 PM
Etc
Matt Wise
07/24/2023, 9:42 PM
Also there is 99% of typos am on my phone
c
Craig100
07/24/2023, 9:44 PM
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 🙂