Copied to clipboard

Flag this post as spam?

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


  • Gísli Freyr Svavarsson 43 posts 126 karma points
    Nov 19, 2013 @ 15:59
    GĂ­sli Freyr Svavarsson
    0

    Author Image

    Hi there I'm trying to add an Author Image to my blog posts. HI've managed to get the image but how can I get a cropped version?

    Lets say the name of ther cropper is "imageCropper" and the specific crop's name is "authorCrop" how do I get the crops? 

    THis is the code for the un-cropped images 

    var imgID = @d.GetPropertyValue("authorImage");                    
    <img src="@Library.MediaById(imgID).umbracFile" alt="@Library.MediaById(imgID).Name"/>

    This is within the uBlogsyListAuthors.cshtml

     

    mvh

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Dec 16, 2013 @ 14:03
    Anthony Dang
    0

    I havent needed to do this recently,  but I think umbraco suffixes image names.

    eg. myimage.jpg becomes myimage_authorCrop.jpg

    or something like that

    I would do some string parsing as a first guess, but I'm sure there's a better way to do that.

     

Please Sign in or register to post replies

Write your reply to:

Draft