Copied to clipboard

Flag this post as spam?

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


  • MB 273 posts 936 karma points
    Jul 09, 2016 @ 16:41
    MB
    0

    Image Cropper: Get full size image

    Hallo everyone,

    I am well aware of how to use the Image Cropper to get the size from an alias. But I'm currently in a situation where I use 3 different aliases which works fine, the issue is that I'm making a button that links to the full sized image.

    Instead of making a NEW uploader and having to write that out, can I somehow get the original uploaded image from my cropper without an alias? :)

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Jul 09, 2016 @ 20:59
    Dan Diplo
    100

    Off top of my head...

    var fullUrl = Model.Content.GetPropertyValue<ImageCropDataSet>("imageAlias").Src
    

    You'll need a reference to Umbraco.Web.Models

  • MB 273 posts 936 karma points
    Jul 09, 2016 @ 21:07
    MB
    0

    Dan, this "top of your head" works flawlessly! It worked exactly as you quoted.

    Thanks a bunch high five

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jul 09, 2016 @ 21:07
    Jeavon Leopold
    0

    If your cropper is on a Media item and the alias is the standard umbracoFile then you can just use mediaItem.Url if your cropper is on a Content item then you need to do what Dan posted above

  • 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