Images Height & Width

Hi Not sure why Google is telling me to put in the Height and Width if it is already in there. Im guessing it is telling me to put it in the CSS instead?

             <img src="images/LINKEDIN.png" class="icons hvr-buzz-out" alt="IOG Linkedin" style="width:22px;height:22px;"></a>

Setting the width/height for images is different for HTML apposed to CSS. Don’t set the widths of images in CSS. Set it in the HTML. Setting it in the HTML is what google wnats, and also when you do this, when page loading, it will reserve the image space so the page doesn’t jump around.

This is what google wants.

<img src="images/LINKEDIN.png" class="icons hvr-buzz-out" alt="IOG Linkedin" width="22" height="22">
2 Likes

ah I see thanks

What about dealing with outside sources? should I just ignore it?

Why are you using other peoples images?

Its a chat system they put in the website.clickdesk

If you know the image dimensions are unlikely to change, why not put height and width into the tags?
Or are they always different?

He should be putting the regular images width/heights into tags anyway. CSS can change it but he still needs to put them in. CSS could be off and this would help keep the space preserved during load.

1 Like

I have no control over these images they are from other sources?

Perhaps you should use your own images, or if they are licensed to be used, get a copy on your own server.

It is a plugin https://www.clickdesk.com/ they should be licensed to be used, however the Avatar illustration I made myself so thats my image :grin: and I optimized that image already…

So get those images - download them and upload them on your own server.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.