Show / Hide Table of Contents

Image providers

The add-on supports multiple image providers for integrating images from external sources.

There are out-of-the-box image providers for several different digital asset management (DAM) systems. Feel free to contact us if you want to integrate an existing DAM or looking for a suitable one.

Add/remove image providers

Image providers are types implementing the IImageProvider interface.

To add an image provider:

var customProvider = new MyCustomProvider(); // Class implementing IImageProvider

ImageProviderFactory.Instance.Register(customProvider);

To retrieve a registered image provider:

IImageProvider? imageProvider = ImageProviderFactory.Instance.Resolve("{provider name}");

To remove an image provider:

ImageProviderFactory.Instance.Remove(customProvider.Name);

To list all registered image providers:

IEnumerable<IImageProvider> imageProviders = ImageProviderFactory.Instance.List();

What it looks like in the UI

The user interface lists image providers in the order they appear in ImageProviderFactory.

In this example, image providers have been added for Unsplash, Pixabay, and Flickr:

Dropdowns are displayed for the selected image provider's options. For hierarchical options, multiple dropdowns are displayed.

Note: Only image providers with at least one searchable option (ImageProviderOptionCapability.Search and/or ImageProviderOptionCapability.List capability) are displayed.

Example image providers

The AdaptiveImages.Unsplash NuGet package contains an image provider for integrating Unsplash. See Getting started for details.

☀
☾
In this article
Back to top
Documentation applies to: Adaptive Images 2.x
☀
☾