Copied to clipboard

Flag this post as spam?

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

  • Tomasz 22 posts 95 karma points
    Jan 26, 2022 @ 21:47

    umbraco9 local and remote images - imagesharp

    I'm trying to find a way to allow my umbraco9 website to serve "local" (CMS media) images via the baked in imagesharp, which is working out of the box. I've setup Azure blob storage, all working fine.

    On top of that, I am in need of serving remote images. These images sit on their respective URLs (eg., and since they are external, I want to crop/resize so that I can "fit" them into the design of my website.

    I've found the following discussion on ImageSharp, which led me to implementing the custom "remote image" provider/resolver. This works fine for the remote images, but breaks existing built in umbraco9 resizing/cropping.

    So with the "remote" solution enabled, my image src="/remote/" will be resized as expected, but src="/media/..." will not.

    I can't seem to find a way make them work "together" (ImageSharp doesn't seem to even document configuration of multiple providers either).

    Thoughts anyone?

  • Tomasz 22 posts 95 karma points
    Feb 02, 2022 @ 20:11

    Adding the startup ConfigureServices for reference:

            services.AddUmbraco(_env, _config)
                .AddContentServiceNotificationHandler() // custom ext
                .AddCustomHostedServices() // custom ext
            . . .
            services.AddHttpClient(RemoteImageResolver.HttpClientName, client =>
                client.Timeout = TimeSpan.FromSeconds(15);
                client.MaxResponseContentBufferSize = 8388608; //8mb

    And app settings section sample:

    "ImageSharp.Web": {
        "AllowedDomains": [
            "", // remote 
  • Ole Martin Bakke 111 posts 623 karma points
    1 week ago
    Ole Martin Bakke

    Hi, I know this is an old question, but I ran into this my self, and my solution was to add back the provider and processor that Umbraco adds here:

    //This is my custom remote provider
    //Provider added by Umbraco
    //Processors added by Umbraco

    This is only tested in Umbraco 10, but I guess it will work in Umbraco 9 as well.

Please Sign in or register to post replies

Write your reply to: