Title: Explicit Width &amp; Height
Last modified: May 4, 2021

---

# Explicit Width & Height

 *  [solsalute](https://wordpress.org/support/users/solsalute/)
 * (@solsalute)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/explicit-width-height/)
 * hello!
 * I have a WP Show Posts grid set up on my homepage to show the most recent posts,
   and on my Page Speed Insights results it gives me the following error regarding
   the featured images that are being pulled for the Show Posts grid:
 * Image elements do not have explicit width and height
    Set an explicit width and
   height on image elements to reduce layout shifts and improve CLS. Learn more
 * Any tips on how to fix it? I do have the image sizes set in the show posts settings…
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fexplicit-width-height%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [Elvin](https://wordpress.org/support/users/ejcabquina/)
 * (@ejcabquina)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/explicit-width-height/#post-14400382)
 * Hi there,
 * Please see my answer here on how to tackle this issue:
 * [https://wpshowposts.com/support/topic/width-height-psi-warning/#post-27115](https://wpshowposts.com/support/topic/width-height-psi-warning/#post-27115)
 *  Thread Starter [solsalute](https://wordpress.org/support/users/solsalute/)
 * (@solsalute)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/explicit-width-height/#post-14402890)
 * Thanks!! I put the CSS in and the spacing is off. The images are stuck together
   and the texts (titles and excerpts) overlap. I removed the CSS but have a screenshot,
   how can I tweak the CSS to get 300×300 with the spacing/margins that show up 
   as it is now?
 *  Plugin Support [Elvin](https://wordpress.org/support/users/ejcabquina/)
 * (@ejcabquina)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/explicit-width-height/#post-14406009)
 * I don’t think it’s possible to fit or show thumbnails in actual 300pxx300px as
   the number of columns won’t allow for it.
 * 300×5 = 1500.
 * It exceeds your content width which is around 1100px. At best you can get to 
   fit 180px, considering the margins and padding.
 * If you mean to actually resize the image file to a 300×300 size/dimension, you’ll
   have to register an image size for it.
    [https://developer.wordpress.org/reference/functions/add_image_size/](https://developer.wordpress.org/reference/functions/add_image_size/)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Explicit Width & Height’ is closed to new replies.

 * ![](https://ps.w.org/wp-show-posts/assets/icon-256x256.png?rev=2846296)
 * [WP Show Posts](https://wordpress.org/plugins/wp-show-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-show-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-show-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-show-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-show-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-show-posts/reviews/)

## Tags

 * [page insights](https://wordpress.org/support/topic-tag/page-insights/)

 * 3 replies
 * 2 participants
 * Last reply from: [Elvin](https://wordpress.org/support/users/ejcabquina/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/explicit-width-height/#post-14406009)
 * Status: not resolved