Copied to clipboard

Flag this post as spam?

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


  • Lucy Foster 10 posts 82 karma points
    Jun 21, 2017 @ 11:44
    Lucy Foster
    0

    Image Cropper Issue v7.4.1

    Hi All,

    I'm having some issues with the image cropper in v7.4.5.

    I've got a master template which needs to output the site logo. I've tried various ways of bringing in the logo using the umbraco documentation. I either an error in the img src or I get an error page saying null object.

    Using this code I get img src(unknown):

    <img src="@CurrentPage.GetCropUrl("siteLogo", "Logo")"/>
    

    I have also tried putting it into a partial view and following the code from the documentation, but I'm still get errors. Any time I use model, I get various other errors, including the null object.

    I have used image cropper in other areas of the site, and it's working perfectly there. It's just on this master page that I am getting the errors.

  • John Bergman 483 posts 1132 karma points
    Jun 21, 2017 @ 17:16
    John Bergman
    0

    I believe you need to include the property name that contains the image.. so something like

    @currentpage.{propertyname}.GetCropUrl()...

    The sample you posted assumes the @currentpage is the image property

  • 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