Copied to clipboard

Flag this post as spam?

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


  • Benjamin Stengaard 27 posts 141 karma points
    May 05, 2017 @ 10:35
    Benjamin Stengaard
    1

    How to use built-in ImageProcessors blurring on multiple images selected by media picker

    Hey Our

    Is it possible to use built-in ImageProcessors blurring on multiple images selected by media picker ?

    @if (CurrentPage.HasValue("caseStudyImages"))
    {
        var caseStudyImagesList = CurrentPage.CaseStudyImages.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
        var caseStudyImagesCollection = Umbraco.Media(caseStudyImagesList);
    
        foreach (var caseStudyImage in caseStudyImagesCollection)
        {
            <img src="@caseStudyImage.GetCropUrl("banner")&blur=20" />
        }
    }
    

    (V. 7.5.13)

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    May 05, 2017 @ 10:39
    Alex Skrypnyk
    101

    Hi Benjamin

    Yes, its possible!

    As told official documentation -

    ImageProcessor is an amazing project for modifying and processing images in a simple an efficient manner.

    We bundle this library in Umbraco 7.1+ and you can therefore take full advantage of all its features out-of-the-box, like sharping, blurring, cropping, rotating and so.

    https://our.umbraco.org/Documentation/Getting-Started/Backoffice/Property-Editors/Built-in-Property-Editors/Image-Cropper#powered-by-imageprocessor

    Example how to use it:

    <img src="@Url.GetCropUrl(Model.Content, propertyAlias: "image", cropAlias: "banner", useCropDimensions:true, furtherOptions: "&blur=11&sigma=1.5&threshold=10")" />
    

    You was almost right how to use it, try to include it to "furtherOptions" param. Hope it will help you.

    Thanks,

    Alex

  • Benjamin Stengaard 27 posts 141 karma points
    Aug 15, 2017 @ 06:20
    Benjamin Stengaard
    0

    Hi Alex

    I can get the sizing properties to work, but none of the bluring, watermark or any other functions. Do you know a running umbraco site, where this is in use?

    (v. 7.6.5)

Please Sign in or register to post replies

Write your reply to:

Draft