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 172 karma points
    May 08, 2021 @ 18:03
    Travis Schoening

    Resize Image Cropper source image

    Is there an easy way to resize the image that is served up in the image cropper itself?

    I ask because I have a scenario where a lot of high-resolution photos will be saved, and I don't necessarily want a 10mb+ file to have to be requested for each image cropper instance. I have the media currently in Azure blob storage.

    To add to that question, is it possible to utilize a CDN for this image request as well?

    Any help is much appreciated!

  • Marc Goodson 1582 posts 10548 karma points MVP 6x c-trib
    May 09, 2021 @ 07:20
    Marc Goodson

    Hi Travis

    Is this purely for the backoffice editing experience?

    When an editor uploads an image, and then wants to manipulate the crops, the file is just tooo big and slows things down?

    (eg vs on the front end, once the image is requested and processed via Image Processsor, the result is cached (and can also be in blob storage) - so the large images aren't processed each time).

    One possibility then is to handle the MediaService Saving event, which fires before the image is saved, 'do your resizing there' - so that the final image uploaded into Umbraco is still 'great' for the web, but much smaller in size.

    There was a great article about options for post and pre processing images in Umbraco by James M South (creator of ImageProcessor!) which is worth a read:

    and Paul Seal has blogged a similar approach here:



  • Travis Schoening 47 posts 172 karma points
    May 09, 2021 @ 14:14
    Travis Schoening

    Appreciate the response Marc, thanks! I've done something like that in the past (Also because I wanted to keep the original regardless of size but still serve up a smaller "working" image" But even then, I didn't see the benefit of serving up a 2-5mb image (instead of 20mb) each time other than maybe the scaling feature when cropping.

    I was just thinking there was a way to append a resize to the image source, that is, without touching the umbraco folder js services.

  • Paul Seal 464 posts 2532 karma points MVP 4x c-trib
    May 09, 2021 @ 17:29
    Paul Seal

    Hi Travis Have a look at my package called smaller images. On saving an image you can resize it and set the config for what size to save images to and choose whether to keep the original or not.



  • Travis Schoening 47 posts 172 karma points
    May 09, 2021 @ 17:56
    Travis Schoening

    Awesome, thanks Paul, will definitely try that out, looks like it's what I'm looking for mostly.

Please Sign in or register to post replies

Write your reply to: