Set an explicit width and height on image elements - Impulse Theme

Mike2021
New Member
2 0 0

Can anyone chime in on how to set the explicit width and height on image elements in the code.  Google Page Speed is pointing at my Logo of all things.

Thanks in advance

Page Speed Score issue.jpg

0 Likes
Michal_Morek
Shopify Partner
819 71 132

Hello Mike2021,

Kindly welcome to the Shopify Community.
I properly read your problem and need to carefully analyze your website to provide a solution here.
Would you kindly share your website URL and if your website is password protected then also give a password?
I will carefully check out the issue and provide a solution to you here.
Please let me know if you have any further questions.

Founder of Shopify agency - Accomplishify.com
If you would like to hire us as Shopify experts, please reach out via:
  • Email michal.morek@accomplishify.com
  • WhatsApp +48 507 613 425
0 Likes
Mike2021
New Member
2 0 0
Thanks Mike, the URL is www.Luxzidor.com and the site is not password protected.
0 Likes
LitExtension
Shopify Partner
1182 146 207

Hi @Mike2021

- Simple you just add width and height attributes into that img tag. Like this:
<img width=“100%” height=“100%” class="medium-up--hide" src="https://cdn.shopify.com/s/files/1/0552/8885/6748/files/Logo_Idea_3_-_1_3c1…" srcset="//cdn.shopify.com/s/files/1/0552/8885/6748/files/Logo_Idea_3_-_1_3c1aa397-…" alt="LUXZIDOR">
- But in the future, I suggest you should use srcset attributes or picture tag in HTML5
- Link to refer: https://www.w3schools.com/tags/tag_picture.asp

 

LitExtension - Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Are you looking for a solution to migrate to Shopify? Contact us for further assistance.
Try our FREE DEMO now!
0 Likes
xdreamineer
Excursionist
16 0 6

@LitExtension 

Hi, can you help point out explicitly where to  add width and height attributes into that img tag.

Sorry I know nothing about coding, so which file and the location would really help

 

Million thanks

Rachel

0 Likes
LitExtension
Shopify Partner
1182 146 207

HI @xdreamineer

Sorry for my late response. You can try to find it on the file name "header.liquid"

 

LitExtension - Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Are you looking for a solution to migrate to Shopify? Contact us for further assistance.
Try our FREE DEMO now!
0 Likes