Copied to clipboard

Flag this post as spam?

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


  • Travis Schoening 47 posts 173 karma points
    Oct 02, 2018 @ 20:20
    Travis Schoening
    0

    Imagecropper source display size

    Has anyone been able to change the max width/height of the image that actually displays in the imagecropper? (or is there a setting that I'm not aware of that actually achieves this?)

    I have a site with many high-resolution photos and each time I open up the document with the imagecropper property editor, it downloads the full sized image. (Note, I'm using azure blob storage). Obviously not ideal.

    Thanks for any help!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 03, 2018 @ 05:04
    Jan Skovgaard
    0

    Hi Travis

    Do you have the AzureBlobCache plugin installed? https://www.nuget.org/packages/ImageProcessor.Web.Plugins.AzureBlobCache/

    Here is a guide on installing and using (Have not tried this myself but looks legit) https://gist.github.com/gjstockham/1dba29e4af634c845704

    You have probably already explored the image cropper documentation here https://our.umbraco.com/documentation/getting-started/backoffice/property-editors/built-in-property-editors/image-cropper but mentioning it for good measure in case others who face the same issue as you pops by this thread :)

    I hope this helps!

    /Jan

  • Travis Schoening 47 posts 173 karma points
    Oct 03, 2018 @ 13:34
    Travis Schoening
    0

    Thanks for the reply Jan, yeah I have AzureBlobCache installed. Just to be clear, everything works great on the front-end of the site, it's just when I'm in the backoffice, when I go to edit an item that uses the image cropper property editor, the image that is used to display is the one that is returning the full-sized image every time. Looking for a way to scale down this image as the full-sized image is being loaded.

  • Travis Schoening 47 posts 173 karma points
    Oct 04, 2018 @ 13:58
    Travis Schoening
    0

    So I just wanted to share what I did to get what I was after working. It's not ideal as I believe it will obviously be overwritten upon an upgrade and have to be added again, but what I was was look into this controller for the imagecropper https://github.com/umbraco/Umbraco-CMS/blob/c90e7735f90cabdf7aea89b7574cc84d4c588702/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.html and at the line for

    $scope.imageSrc = $scope.model.value.src; 
    

    I changed it to

    $scope.imageSrc = $scope.model.value.src + '?width=1000';
    

    Now the image is resized and comes up quickly when editing the imagecropper editor is used. (To recap, before, a 14mb image 6000 pixels wide would download the whole image each time to display in the editor itself. Far from ideal).

  • 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