rtMedia
rtMedia copied to clipboard
Buddypress image post thumbnail format
Customer Query: Is there a way to have the image post thumnails in a responsive format? For now, an image thumbnail in an acitivity post (buddypress) for example gets cropped to a standard format. We want to change that to have responsive adapted image thumbnails.
refer: https://rtmedia.io/ticket/2872554/
Hi @pavanpatil1,
Thank you for your query. Yes, it is possible to make the BuddyPress image post thumbnails responsive. Currently, thumbnails are cropped to a fixed size, but you can achieve responsive thumbnails by:
-
CSS adjustment – Add the following CSS to your theme or custom CSS:
.rtm-activity-img img, .rtm-media-item img { width: 100%; height: auto; object-fit: cover; /* optional, keeps aspect ratio */ } -
rtMedia settings – In rtMedia → Settings → General → Image Sizes, you can disable hard cropping or adjust thumbnail dimensions to preserve aspect ratio.
-
Ensure srcset is used – WordPress automatically generates multiple image sizes. Ensure the theme outputs the srcset attribute for thumbnails to serve different sizes on different screen widths.
This approach will allow activity post thumbnails to adapt responsively to different screen sizes.