Take the community feedback survey now.
AI OnAI Off
Take the community feedback survey now.
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.
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.