Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • lustoykov 1 post 71 karma points
    Nov 06, 2015 @ 15:14
    lustoykov
    0

    Can't display Image (Media Picker -> Image Cropper)

    Hi everyone,

    the setup: Document Type with Property from Data Type "Media Picker" (alias: map) is allowed to choose files from Data Type "Image Cropper" (alias: umbracoFile) in Media.

    the problem: How do I display the chosen image? (Picked from Media Picker, but already cropped by "Image Cropper" and present in the media library)

    solutions tried: A LOT. What I thought should work, doesn't:

    var imgId = Model.Content.GetPropertyValue<int>("map");
    var img = Umbraco.TypedMedia(imgId);
    var urlFirstVar = img.GetCropUrl("banner");
    var urlSecondVar = img.GetCropUrl("umbracoFile", "banner");
    var urlThirdVar = img.GetCropUrl(100,200);
    

    None of these is working... any ideas? Thanks.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies