Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Is it possible to resize an image using GetCropUrl() only setting ie. max width?
Yes it is, could you post your current code where you wish to do this so I can give you the correct snippet?
<img src="@media.GetCropUrl("bigImage")" alt="" />
Can you show me how you set @media?
var media = Umbraco.Media(page.GetValue<int>("image"));
Ok then, this should do it:
At the top add:
var media = Umbraco.TypedMedia(page.GetValue<int>("image"));
<img src="@media.GetCropUrl(propertyAlias:"bigImage", imageCropMode:ImageCropMode.Pad, width:300)" alt="" />
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted