A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. 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
Vote:
 

I think we have overriden the scaling so we can calculate the new proportions of the image.We use width or height to scale the new image to keep its proportion. But i guess this is a bigger job. Are the images only for the edit ui or are you using them externally.

#340851
Oct 22, 2025 21:57
* 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.