Getting hold of UmbracoFile properties
# help-with-umbraco
c
On this MediaWithCrop, what would be the correct syntax to get hold of this property called umbracoWidth in the image below:
m
mainImage.Content?.Value("umbracoWidth") Or If(mainImage.Content is Image image) image.Width
c
Thanks 🙂
m
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
c
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 🙂
That's worked now. Thanks alot 🙂
2 Views