• Resolved Doremdou

    (@doremdou)


    Hello, I am using Page Speed and it says that:

    Specify image dimensions
    The following image(s) are missing width and/or height attributes.

    …plugins/wp-postratings/images/stars_crystal/rating_half.png (Dimensions: 20 x 20)
    …plugins/wp-postratings/images/stars_crystal/rating_off.png (Dimensions: 20 x 20) (11 uses)
    …plugins/wp-postratings/images/stars_crystal/rating_on.png (Dimensions: 20 x 20) (13 uses)

    I really need to change that as it says that this is a high priority (my score for this is 0…)

    I will never change my stars design so, where can I specify the height(20px) and width(20px) ?

    Thank you a lot by the way for this awesome plugin!
    keep up the good work ??

    Dorem

    PS: sorry for my bad english ;o

    https://www.ads-software.com/extend/plugins/wp-postratings/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Doremdou

    (@doremdou)

    Please can someone help me…?
    thanks ??

    Curious about this as well, hope someone knows.

    Thread Starter Doremdou

    (@doremdou)

    Hi Sho-Down, I found something which seems to work:

    in wp-postratings.php:
    line 1403 (for example) find:

    echo ‘<img src=”‘.$postratings_url.’ ……>’

    add:
    width=”20″ height=”20″

    like this:
    echo ‘<img width=”20″ height=”20″ src=”‘.$postratings_url.’ ……>’

    and do that for each line with echo ‘<img src=”…

    hope it helps

    Thread Starter Doremdou

    (@doremdou)

    Just one thing, I don’t know anything about code, I found this which seems to work for my problem, but I am not sure that this modification is needed everywhere with img src, so…. if someone know where it is useless and where not, please tell me ??

    is correct

    Thread Starter Doremdou

    (@doremdou)

    Hello,

    after 10 month I am back… is there a better solution for this problem by chance? ^^

    thank you!

    Plugin Author Lester Chan

    (@gamerz)

    The reason why I don’t specify any size is I want to make it easier for user to choose the ratings style without needing to worry about the size.

    If you want, the easiest way will be via CSS

    .post-ratings IMG { width: 16px; height: 16px; }

    Thread Starter Doremdou

    (@doremdou)

    Hello Lester Chan thank you for your answer ??
    Yes of course I understand,
    thank you I think it will be easier with this fix after plugin updates haha!

    Thanks again,
    keep up the good work ??
    Dorem

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Page Speed Specify image dimensions (stars)’ is closed to new replies.