Support » Plugin: WP-PostRatings » Specify image dimensions Image Size

  • Resolved Julian Magnone

    (@jmagnone)


    Hi,

    I am running GT Metrix and Google Page Speed tools to check the website performance and one of the recommendations I receive is “Specify image dimensions”. Checking the images generated in the WP blog I could see that the recommendations are for the images displayed for WP PostRatings.

    “The following image(s) are missing width and/or height attributes.”
    /wp-content/plugins/wp-postratings/images/stars/rating_half.png (Dimensions: 16 x 16) (5 uses)
    “Specifying a width and height for all images allows for faster rendering by eliminating the need for unnecessary reflows and repaints.”
    This is marked as high priority in these tools.

    Is there any workaround to set the rating image height and width?

    Thanks,

    Julian

    https://wordpress.org/plugins/wp-postratings/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Lester Chan

    (@gamerz)

    Technically you need to modify the plugin wp-postratings.php.

    Find: class="post-ratings-image"
    Replace with: class="post-ratings-image" width="16" height="16"

    There are about 30 entries of ‘class=”post-ratings-image”‘. Do I have to replace it for all of them?

    Thanks.

    Plugin Author Lester Chan

    (@gamerz)

    Yes

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Specify image dimensions Image Size’ is closed to new replies.