Doesn't that give me the height of the banner crop?
JSON below show the width and height of each crop. BUT only the "src" to the original image, I miss the width and height alongside the "src". Right now I'm think that the only way is to hook into the save-event and read the file and then the image's dimensions and finaly save them to a property.
ImageCropper - Original image's width and height
From the awesome ImageCropper I can get the url to the original image with ".Url". But how do I get the height and width of this image?
Hi Mikkel
I think that you should be able to do something like
Does that work?
/Jan
Hi Jan
Doesn't that give me the height of the banner crop?
JSON below show the width and height of each crop. BUT only the "src" to the original image, I miss the width and height alongside the "src".
Right now I'm think that the only way is to hook into the save-event and read the file and then the image's dimensions and finaly save them to a property.
Hi Mikkel
Yes - I also thought that it was what you were after. But now I get that you want the original image's dimensions. Not those of the crop. My bad :)
I don't think it's possible out of the box...unless you just try fetching the image like @Umbraco.Media(1234) perhaps?
/Jan
Ha, why don't I just try the easy solution first!
Added the two standard properties there is on the "Image" media type: umbracoWidth and umbraco Height
And just as predicted the width and height is saved to these labels. So the ImageCropper does the magic as the Uploader :-)
/Mikkel
Mikkel,
I'm looking to get the original width & height... when you say you added the standard properties, where/how exactly did you add those?
Thanks!
Because it's hard to notice the forest due to all them damn trees? :)
Good to see you got it solved - Perhaps it was just a bit too early in the morning :D
/Jan
is working on a reply...