Copied to clipboard

Flag this post as spam?

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


  • Chris Norwood 41 posts 336 karma points
    May 30, 2019 @ 09:15
    Chris Norwood
    0

    Image Processor and Azure (via CDN)?

    Hi Umbracians!

    I've read several threads about this subject, but I was wondering if there's any specific advice regarding it.

    We have an installation of Umbraco (7.14.0) running on Azure, with images stored on a blob and saved via FileSystemProvider; they are retrieved via an Azure CDN using a helper method. (https://our.umbraco.com/packages/collaboration/umbracofilesystemprovidersazure/)

    We are not currently using the Image Cropper, but I would like to add it as an option so that our users don't have to keep optimising their images manually before uploading them; however, it seems that there are some complexities with getting this set up and working.

    The approaches I've read are: 1) Use the Azure CDN toolkit: https://our.umbraco.com/packages/developer-tools/azure-cdn-toolkit-for-umbraco/

    2) Upgrade ImageCropper to the latest version and use the AzureBlobCache plugin:

    https://imageprocessor.org/imageprocessor-web/plugins/azure-blob-cache/

    Does anybody have any experience with either of these approaches? Can the second one be used via a CDN or does it still require the CDN toolkit?

    Thanks in advance!

  • Søren Kottal 440 posts 2677 karma points MVP c-trib
    May 30, 2019 @ 12:34
    Søren Kottal
    0

    Hi Chris

    We have used the AzureBlobCache plugin for a handful of projects, works very well once you get the config right.

    You don't need to use the CDN toolkit to use AzureBlobCache, but if you want to use the toolkit, you need to use the AzureBlobCache plugin :)

  • Dan Diplo 1463 posts 5630 karma points MVP 3x c-trib
    May 30, 2019 @ 13:40
    Dan Diplo
    100

    I've used the AzureBlobCache plugin for Image Processor and it can then be configured to cache all your generated image processor images in Blob storage. I'd recommend installing via NuGet:

    https://www.nuget.org/packages/ImageProcessor.Web.Plugins.AzureBlobCache/

    The config can be a little tricky to get right, but it does work very well once configured.

  • Chris Norwood 41 posts 336 karma points
    May 30, 2019 @ 13:48
    Chris Norwood
    0

    Thanks both - I seem to have it set up and configured correctly (I already had the FileSystemProvider for Azure set up so I had all the settings ready :))...

    Just about to give it a test!

  • Dan Diplo 1463 posts 5630 karma points MVP 3x c-trib
    May 30, 2019 @ 15:48
    Dan Diplo
    0

    If it's working you should should see a new container within your Blob storage called "cache" (that contains all the numbered folders you used to see on disk).

  • Chris Norwood 41 posts 336 karma points
    May 30, 2019 @ 16:10
    Chris Norwood
    0

    I had a bit of a struggle to get it to actually serve cropped images (missed out the prefix="media/" in the security.config in the CloudImageService and AzureImageService elements).

    It seems to be working now and serving the cropped images, but at the moment (presumably because I'm running locally) it's storing the images in ~/app_data/cache

    The "cache" container is there in the blob already (I created it), but I assume that it will just find it and write to it - I'll publish the development branch shortly and see what happens!

    Thanks for your help! :).

  • Chris Norwood 41 posts 336 karma points
    May 30, 2019 @ 17:42
    Chris Norwood
    0

    Finally worked out the "caching locally" issue - I hadn't updated the "currentCache" setting in cache.config to tell it to use the AzureBlobCache instead of the DiskCache...(sometimes I need more coffee).

    All working as expected now!

Please Sign in or register to post replies

Write your reply to:

Draft