Adaptive Images with Optimizely CMP

Den här artikeln är inte översatt till svenska och visas därför på engelska istället.


Images from Optimizely CMP can now be seamlessly integrated into Optimizely CMS through Adaptive Images, with the all same features that web editors and developers have come to love.

Uppskattad lästid : 3 minuter

Gå till avsnitt

Key takeaways

  • DAM images from Optimizely CMP appear in the "Image bank" pane in the CMS
  • Available through NuGet package called AdaptiveImages.CMP
  • Single line of code to enable, no other development effort required

What it does

Let's say you have a DAM library with multiple folders in Optimizely CMP:

As should be in a DAM, images are high-resolution with tags automatically added by CMP:

With the image provider for CMP enabled, images appear in the "Image bank" widget that comes with the Adaptive Images add-on, allowing us to use them in CMS content:

As always with Adaptive Images, the web editor can easily change the cropping to fit any context, including responsive images:

That's it! No need for copying images or managing CMS-specific renditions in CMP.

And you can still use images uploaded to the CMS, or images from other DAMs, in parallel with a consistent user experience for both web editors and developers.

Prerequisites

  1. Optimizely CMS 12
  2. Optimizely DAM (separately or as part of CMP) with Graph enabled
  3. Adaptive Images

Enabling the CMP image provider

  1. Add the AdaptiveImages.CMP NuGet package from the Optimizely feed
  2. Invoke AddOptimizelyCmp() in your Startup class:
    services.AddOptimizelyCmp(new CmpSettings(
        graphEndpoint: "https://cg.optimizely.com/content/v2?auth={authKey}",
        clientId: "{API client ID}",
        clientSecret: "{API client secret}"));
    

New to Adaptive Images?

Information about the Adaptive Images add-on and what it does for site owners and web editors: adaptiveimages.net

If you're a developer, you can find plenty of code samples on sdk.adaptiveimages.net