Post Tiles
[resolved] Resize featured image to match tile size (3 posts)

  1. NoHoSe
    Posted 3 years ago #

    I wanted to have my featured images shown completely as tile background i.e. no cropping).
    I tried as per http://wordpress.org/support/topic/featured-image-thumbnails-1 without success.
    The solution I found was to replace (in post-tiles.php) the following code around line 565:
    $featured_style = "style='background: url(".$url.") 0 0;' class='featured-image ".$animation_style." ".$cat_var."'";
    by this one:
    $featured_style = "style='background-image: url(".$url."); background-size: contain;' class='featured-image ".$animation_style." ".$cat_var."'";
    Just thought I'd share this...


  2. ethanhackett
    Plugin Author

    Posted 3 years ago #

    Awesome thanks NoHoSe.

    Just as an FYI background-size isn't supported in IE8. So though it's a good solution it can alienate some users.

  3. sytseelzinga
    Posted 3 years ago #

    Worked for me! thanks. I changed the 'contain' to 135%...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Post Tiles
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic