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.
It looks like a bug in V8. I've added a github issue for this. https://github.com/umbraco/Umbraco-CMS/issues/5737
I was also facing the same problem. However when I reset the focus point in each of the images it started showing.
This code works:
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted