Advertising sustains the DA. Ads are hidden for members. Join today

Media Object

Last updated on
16 May 2024

The media object will display your view content in abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content as documented.

media object display example

This module cannot set a Bootstrap image shape to the images displayed through the Media Object view style. Views does not control the field formatter and items like images are often set to a rendered entity. Views would not be able to inject the class into the image tag itself either. My suggestion is to look into a module like Element Class Formatter for Drupal 8. If you want to get down and dirty with the theming, you can do something as described on Drupal Stack Exchange where you would create an image style and then do a preprocessor on it to add the class(es) you want.

Help improve this page

Page status: No known problems

You can: