[Skip to main content](#vessel-content)

#   No width and height attributes in Product list.

##

- **[KEKO512](/forum/user/58505-keko512 "View KEKO512's Profile")**
- [![KEKO512's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58505-keko512 "View KEKO512's Profile") Topic Author
- [ Offline](/forum/user/58505-keko512)

Less More

- Posts: 9
- Thank you received: 0
-
-

2 years 10 months ago [\#357985](#357985) by [KEKO512](/forum/user/58505-keko512 "View KEKO512's Profile")  *[No width and height attributes in Product list.](/forum/4-how-to/907533-no-width-and-height-attributes-in-product-list#357985 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.0.1 -- PHP version -- : 8.2 -- Browser(s) name and version -- : Firefox 120.0.1  When evaluating my website on Google PageSpeed Insights.  In product list , I receive the following message.  &quot;Image elements don't have any explicit width or height attributes&quot;  This affects Google's evaluation.  There is some way to fix it.")* was created by *[KEKO512](/forum/user/58505-keko512 "View KEKO512's Profile")*

-- HikaShop version -- : 5.0.2
-- Joomla version -- : 5.0.1
-- PHP version -- : 8.2
-- Browser(s) name and version -- : Firefox 120.0.1

When evaluating my website on Google PageSpeed Insights.

In product list , I receive the following message.

"Image elements don't have any explicit width or height attributes"

This affects Google's evaluation.

There is some way to fix it.

- [ ![error-page-speed.png](/forum/attachment/58505) ](/forum/attachment/58505 "...page-speed.png") [ ](/forum/attachment/58505?download=1 "...page-speed.png")
- [ ![hika-shop.png](/forum/attachment/58506) ](/forum/attachment/58506 "hika-shop.png") [ ](/forum/attachment/58506?download=1 "hika-shop.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwNzUzMy1uby13aWR0aC1hbmQtaGVpZ2h0LWF0dHJpYnV0ZXMtaW4tcHJvZHVjdC1saXN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14293
-
-

2 years 10 months ago [\#357989](#357989) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[No width and height attributes in Product list.](/forum/4-how-to/907533-no-width-and-height-attributes-in-product-list#357989 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.0.1 -- PHP version -- : 8.2 -- Browser(s) name and version -- : Firefox 120.0.1  When evaluating my website on Google PageSpeed Insights.  In product list , I receive the following message.  &quot;Image elements don't have any explicit width or height attributes&quot;  This affects Google's evaluation.  There is some way to fix it.")*

Hi,

First, please note that this is not as clear cut as this.
I invite you to read here:
[ stackoverflow.com/questions/32217863/seo...r-responsive-website](https://stackoverflow.com/questions/32217863/seo-impact-on-specifying-image-width-and-height-for-responsive-website)
Specifying the height and width of the images can impact the responsiveness of the pages, which in turn will degrade SEO performances.

To add the width and height attributes to product images on listings, you can edit the view file product / listing_img_title.php via the menu Display&gt;Views and change the line: Code:

$html = '&lt;img class="hikashop_product_listing_image" title="'.$this-&gt;escape((string)@$this-&gt;row-&gt;file_description).'" alt="'.$this-&gt;escape((string)@$this-&gt;row-&gt;file_name).'" src="'.$img-&gt;url.'"/&gt;';

to: Code:

$html = '&lt;img class="hikashop_product_listing_image" title="'.$this-&gt;escape((string)@$this-&gt;row-&gt;file_description).'" alt="'.$this-&gt;escape((string)@$this-&gt;row-&gt;file_name).'" src="'.$img-&gt;url.'" width="'.$img-&gt;width.'" height="'.$img-&gt;height.'"/&gt;';

The following user(s) said Thank You: [KEKO512](/forum/user/58505-keko512 "View KEKO512's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwNzUzMy1uby13aWR0aC1hbmQtaGVpZ2h0LWF0dHJpYnV0ZXMtaW4tcHJvZHVjdC1saXN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[KEKO512](/forum/user/58505-keko512 "View KEKO512's Profile")**
- [![KEKO512's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58505-keko512 "View KEKO512's Profile") Topic Author
- [ Offline](/forum/user/58505-keko512)

Less More

- Posts: 9
- Thank you received: 0
-
-

2 years 10 months ago [\#357992](#357992) by [KEKO512](/forum/user/58505-keko512 "View KEKO512's Profile")  Replied by *[KEKO512](/forum/user/58505-keko512 "View KEKO512's Profile")* on topic *[No width and height attributes in Product list.](/forum/4-how-to/907533-no-width-and-height-attributes-in-product-list#357992 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.0.1 -- PHP version -- : 8.2 -- Browser(s) name and version -- : Firefox 120.0.1  When evaluating my website on Google PageSpeed Insights.  In product list , I receive the following message.  &quot;Image elements don't have any explicit width or height attributes&quot;  This affects Google's evaluation.  There is some way to fix it.")*

Thanks a lot, this was solved.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwNzUzMy1uby13aWR0aC1hbmQtaGVpZ2h0LWF0dHJpYnV0ZXMtaW4tcHJvZHVjdC1saXN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.051 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
