Copied to clipboard

Flag this post as spam?

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


  • Marco Graziotti 40 posts 166 karma points c-trib
    May 04, 2021 @ 08:55
    Marco Graziotti
    0

    Image Cropper doesn't work with Azure Blob Storage (UmbracoFileSystemProviders.Azure v2)

    Hi,

    On my Umbraco 8 solution I have installed the "UmbracoFileSystemProviders.Azure v2" NuGet via Visual Studio "Manage NuGet Packages", and when I use the "GetCropUrl( )" method, it returns the URL correctly, but the image shown isn't cropped.

    Here you can see how I'm getting the URL:

    HomePage homePage = Umbraco.ContentAtRoot().DescendantsOrSelf<HomePage>().FirstOrDefault();
    var image = homePage.CategoryListCategories.First().ContentImage;
    var imageCropped = ImageCropperTemplateExtensions.GetCropUrl(image,150,200,"UmbracoFile", "Inline mobile", null,null,null, true, true);
    

    And here the URL that I get:

    imageCropped = /media/qngfds9l/test-image.jpg?anchor=center&mode=crop&width=374&height=260&rnd=132645303938800000
    

    The image shown at this URL it isn't cropped.

    I also have defined different crop aliases, I have configured my "web.config" and "security.config" properly, but the cropper doesn't work.

    Do you have any suggestions?

    Thank you

  • Marco Graziotti 40 posts 166 karma points c-trib
    May 04, 2021 @ 09:25
    Marco Graziotti
    0

    Hi,

    I have found a solution in an old Umbraco 7 post.

    It seems that if you proceed installing the "UmbracoFileSystemProviders.Azure v2" via "Visual Studio > Manage NuGet Packages", it will not install all the necessary dependencies.

    So, after you have installed and configured the "UmbracoFileSystemProviders.Azure" NuGet following the GitHub instructions, you need to run your Umbraco solution. Going to the backoffice, under "Packages" searching "UmbracoFileSystemProviders.Azure" and installing it again. It will start a wizard that automatically takes all your previous configurations, and installs all the missing dependencies.

    Here the wizard: enter image description here

    Here the missing files added, see the "A" (Added) and "M" (Modified) tags:

    enter image description here

    Here the missing dependencies added: enter image description here

    I hope that this can be useful to other Azure users.

    Thank you

  • Marco Graziotti 40 posts 166 karma points c-trib
    May 14, 2021 @ 18:30
    Marco Graziotti
    0

    It was easier than what I thought.

    I opened an issue on the project's GitHub, and to fix it you need to install the "UmbracoFileSystemProviders.Azure.Media" NuGet package, and NOT the "UmbracoFileSystemProviders.Azure" package.

Please Sign in or register to post replies

Write your reply to:

Draft