Copied to clipboard

Flag this post as spam?

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


  • Charles Roper 48 posts 200 karma points
    Jul 28, 2016 @ 12:35
    Charles Roper
    0

    Image Cropper not cropping

    Image Cropper in the site I'm building is not cropping images. I'm developing on 7.4.3 using IIS Express (just the standard Ctrl-F5 in VS). I've installed using NuGet.

    This is the view code:

    <img src="@Url.GetCropUrl(habitat, "cardImage", "crop")" width="280" height="144" alt="@habitat.GetPropertyValue("cardImageAltText")" />
    

    This is the image URL I get back:

    http://localhost:5393/media/1008/river.jpg?crop=0,0.065142774524687336,0,0.24958907787795226&cropmode=percentage&width=560&height=288&rnd=131141796410000000
    

    The image, however, is being sent at its original size: http://i.imgur.com/0nvbaf8.png

    If I do something simple like this:

    http://localhost:5393/media/1008/river.jpg?mode=crop&width=100
    

    The image again is returned at its original size.

    I've noted that there is no ~/App_Data/cache folder being created.

    I've updated ImageProcessor to 2.4.3.0 and ImageProcessor.Web to 4.6.3.0.

    I am using UmbracoFileSystemProviders.Azure for media (which works fine), but I haven't installed AzureBlobCache plugin for ImageCropper. Could that be the problem? I've also noticed that images uploaded using the cropper don't appear in the Media section - is that supposed to be the case?

    I'm completely stumped!

  • Dan Diplo 1554 posts 6205 karma points MVP 5x c-trib
    Jul 28, 2016 @ 13:12
    Dan Diplo
    0

    There definitely should be a ~/App_Data/cache folder, so if none is created then this is where the issue lies. Could it be a permission problem? Is there anything in the Umbraco logs? Maybe try running VS as administrator?

  • Charles Roper 48 posts 200 karma points
    Jul 28, 2016 @ 13:57
    Charles Roper
    0

    Thanks Dan. I doubt it's permissions because I've installed uSync which generates stuff into App_Data just fine. I've just tried running VS as an admin anyway, but that didn't help.

    I've been keeping an eye on the logs (using your excellent log viewer) but can't see anything out of the ordinary.

    I'm going to revert to using the media folder rather than Azure blob storage to see if that's causing a problem.

    Could you confirm whether I should or should not be seeing the image uploaded via the cropper in the media library in back office?

  • Charles Roper 48 posts 200 karma points
    Jul 28, 2016 @ 14:10
    Charles Roper
    0

    So it is related to UmbracoFileSystemProviders.Azure. I've reverted back to the default config in FileSystemProviders.config and checked stuff is being created in ~/media/ (it is). ImageCropper is now working.

    So, does that mean I need to use the AzureBlogCache plugin to make ImageCropper play nicely with the Azure filesystem provider?

    Or is something else going on? Maybe a config error?

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Jul 28, 2016 @ 17:10
    Jeavon Leopold
    100

    No you don't need it (but it's a good add on).

    Did you install UmbracoFileSystemProviders.Azure using NuGet or the Umbraco package?

    If you used NuGet I would recommend you install the Umbraco package over the top and complete the setup wizard, it will do no harm and will check your configuration is correct.

  • Charles Roper 48 posts 200 karma points
    Jul 29, 2016 @ 09:28
    Charles Roper
    0

    Jeavon, many thanks - that fixed it. My old config was the same, but the package I installed was 0.5.3-beta whereas I'd installed the older 0.5.2-beta via NuGet. I should have thought to check if there was a more up-to-date version!

  • Charles Roper 48 posts 200 karma points
    Jul 29, 2016 @ 09:41
    Charles Roper
    0

    Actually, no, tell a lie. I think installing the package added ~/Config/imageprocessor/security.config which has the CloudImageService bit in it. That's what I was missing before.

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Jul 29, 2016 @ 09:42
    Jeavon Leopold
    0

    Ah yes, that's probably it!

  • Paul de Quant 403 posts 1520 karma points
    Jul 24, 2018 @ 07:12
    Paul de Quant
    0

    Hi,

    I'm experiencing a similar issue, I too use Azure storage container, but I find that none of my crop profiles actually crop the image.

    I've installed ImageProcessor.Web.Plugins.AzureBlobCache and ImageProcessor.Web.PostProcessor but still no joy.

    Do you have to have a Azure CDN to make this work?

    I've configured:- /Config/FileSystemProviders.config So i know my images are being saved to correct location

    /Media/web.config For the file handler

    /Config/Imageprocessor/cache.config And put in what I can excluding a CDN

    Finally /Config/ImageProcessor/security.config With details of the CloudImageService

    Am I missing anything? Using Umbraco 7.11.1 ImageProcessor.Web.Plugins.AzureBlobCace 1.4.2.19 UmbracoFileSystemProviders.Azure 1.0.2

    Thanks

    Paul

  • Paul de Quant 403 posts 1520 karma points
    Jul 24, 2018 @ 08:01
    Paul de Quant
    0

    An update, I can see the cache folder is now populating. However images now appear broken.

    I can see that all my images are now doing a 302 redirect from the media folder to the cache folder.

    Is there a setting i need to change.

    Thanks

    Paul

  • Dan Diplo 1554 posts 6205 karma points MVP 5x c-trib
    Jul 24, 2018 @ 12:20
Please Sign in or register to post replies

Write your reply to:

Draft