Skip to content

Commit

Permalink
Merge pull request #76 from Strategy11/fix-3178
Browse files Browse the repository at this point in the history
Add style property to the thumbnail image element
  • Loading branch information
sorinmarta authored Dec 6, 2024
2 parents b4e63af + 458bdbf commit d65f545
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/class-image-placeholders.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ private function render_image_placeholders( $ad, $placeholder ) {
$image_attributes = array(
'class' => 'awpcp-listing-primary-image-thumbnail',
'alt' => awpcp_esc_attr( $this->listing_renderer->get_listing_title( $ad ) ),
// This was added after WordPress 6.7
// See: https://github.com/Strategy11/awpcp/issues/3178
'style' => 'width: ' . $thumbnail_width . 'px;',
);

// TODO: Can we regeneate thumbnails every time the user changes
Expand Down

0 comments on commit d65f545

Please sign in to comment.