Jump to content

Adding image size attributes to images


Bill_w

Recommended Posts

Hi,

As the topic title says, I am trying to optimise my site somewhat. I have learned that adding size attributes to images will enhance the search engine ratings and I would like to know how to do this please if it's possible that is? Thanks Bill

networkreview.co.uk

Link to comment
Share on other sites

We see that you are using Foundation, which is a 'responsive' skin. That is to say, the content zones and images scale up or down to fit the changing width of the browser window (viewport).

Even so, experiments show that the image will still scale if there are CSS rules that apply (such as height:auto and max-width:100%).

There will be a bit of work involved:
editing numerous templates
adding to the product dataset actual image dimensions

The dimensions could be problematic because CubeCart makes a derivative of a source image to match the space allocated for it in the template. That derivative is renamed by adding the size to the filename -- according to named sizes found in the skin's config.xml file.

That size value can be obtained in several ways, but...

The size value is indicative of the largest side: height or width. I see some of your images are wide and short, others tall and narrow. Getting the not-longest-side value will also need to be coded into the product's dataset.

So, short answer: yes, it's possible. Long answer: a lot of work will need to be done.

Link to comment
Share on other sites

On 5/6/2019 at 10:49 PM, bsmither said:

So, short answer: yes, it's possible. Long answer: a lot of work will need to be done.

And really not worth any effort especially when using responsive skins - far, far more areas you can focus on to optimise the site and help with SERPS

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...