News:

Support the VirtueMart project and become a member

Main Menu

Defining the Size of Images

Started by xniickiidx, September 10, 2015, 13:21:19 PM

Previous topic - Next topic

xniickiidx

I have done an Online Website Report on my website and it is saying that most images I have used don't have defined sizes using width and height attributes in the HTML. I know these attributes are optional, but they are recommended as they help the browser arrange the page faster and I am trying to improve my loading time on my web pages for my online shop.

Could anyone help me or point me in the right direction as to what coding to use in the HTML and what files I need to use to do this?


Thanks in advance for any help.

jenkinhill

AFAIK image height & width are not a requirement in HTML5, and pretty pointless when using responsive pages and css sized images as the displayed image size depends on the boroser window dimensions.

Rendering speed is more usually related to the actual download speed of page components (ie the file sizes) rather than the calculations related to object placement. Having fixed sizes for images suggests that you would also need fixed sizes for all other page elements.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

GJC Web Design

I have also seen Google Speed etc whinging about this.. and it is totally silly as Jenks points out

But if your goog speed ranking is important to you you can add say in the template
height="100" width="100" in the img element

css will over ride it and u still have responsive

Google speed thinks its so clever and gives u a couple of % more
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation