World is now on Opti ID! Learn more

Customizing Thumbnail Behavior in Optimizely Assets Pane

Vote:
 

I have a custom media object that inherits from MediaData and IContentImage.

I have overridden the Thumbnail property to return a resized thumbnail image. However, ImageDescriptor does not support resizing based on the original image aspect ratio.

[ImageDescriptor(Width = 48, Height = 48)]
public override Blob Thumbnail
{
    get
      {
        return base.Thumbnail;
       }
     set
       {
         base.Thumbnail = value;
       }
}

To work around this, I implemented a Dojo module that applies custom styling to the thumbnail image in the assets pane. In this module, I have hardcoded some components using CSS classes.

const container = query(".epi-thumbnailContentList.dgrid")[0];

query(".epi-thumbnail")

I would like to know if this is the best approach. Hardcoding CSS classes might break my script if Optimizely releases changes to the assets pane UI.

#339523
Edited, Jun 24, 2025 15:17
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.