Image Cropper
# help-with-umbraco
d
I am new to Umbraco and am following a course that is based on Umbraco 8, though I am follwoing along with Umbraco 12. In the course image cropper is used at one point, but the way to get an image to the view seems to have changed. This is how the code looks now:
Copy code
<div class="container">
  <div class="row">
        @foreach (var item in lastestNews)
        {
          var imgCropper = item.Value<ImageCropperValue>("articleImage");
          var thumbUrl = imgCropper.Src + imgCropper.GetCropUrl("Thumb");
          <div class="col-md-4">
            <div class="card" style="width: 18rem;">
              <img class="card-img-top" src="@item.GetCropUrl(cropAlias: "thumb", useCropDimensions: true)" alt="Card image cap">
              <div class="card-body">
                <h5 class="card-title">@item.Name</h5>
                <p class="card-text">@item.Value("leadIn")</p>
                <a href="@item.Url()" class="btn btn-primary">Read article</a>
              </div>
            </div>
          </div>
        }

  </div>
</div>
Would be really happy if someone could point to how that is handled in Umbraco 12.
I've found that it changed and updated the image tag to this
<img class="card-img-top" src="@Url.GetCropUrl(item.Value<IPublishedContent>("articleImage"),"thumb", true)" alt="Card image cap">
However, the image is still not rendering
s
I think you're now best to use a Media Picker (v3). It has all the image cropper goodness built in - and can be used in block lists. https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3