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
Hi, I'm trying out v. 8 for a bit this morning. I'm having trouble rendering cropped image urls though. I did this the other day in v.7 without issues. Has anything changed or am I missing something?
testimonial.Image is a MediaPicker and I've defined a crop called "Testimonial".
@testimonial.Image.Url renders an URL fine.
@testimonial.Image.GetCropUrl("Testimonial") renders nothing.
@Url.GetCropUrl(testimonial.Image, "Testimonial") renders nothing.
If I go and edit the crop. The image renders afterwards. It seems you dont get a default crop?
I don't see this behaviour in v. 7.
I'm using umbraco 8. How is the idea of how to solve this problem?
Probably there are better ways to do this but this is how i did it:
@if (Image != null)
<img class="img-fluid d-block" src="@Image.GetCropUrl(250,150)" alt="@Image.Name" />
thanks for the answer, it solved
I don't think this solves the question since the extension with crop alias is not working in Umbraco 8.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted