Trakis

Trakis · Rules

Images without declared dimensions

Images without width and height attributes. Without them the browser does not know how much space to keep, and the page jumps as images load. That jump is measured (Cumulative Layout Shift) and it annoys people.

WarningPERF-001 · Performance · checked on every page

Where it usually comes from

Images inserted with only a src, themes that strip width and height to make images responsive, and lazy-loading scripts that replace the tag.

How to fix it

  • Give every <img> its width and height attributes — the image's real size in pixels. CSS can still make it responsive.
  • The browser then keeps the space while the image loads, and the page stops jumping.
pattern
<img src="…" width="800" height="600" style="max-width:100%;height:auto" alt="…">

Shown for an example shop at www.example.com. In a Trakis report the same fix comes with your own addresses and the list of your pages it applies to.

How to check it yourself

In the developer tools, inspect an image and check for width and height attributes on the <img> tag.

What it looks like in a report

Warning 14 images have no width and height, so the layout shifts while they load. · whole site

The theme prints images without dimensions; adding them in the image component fixes every page. (An example shop; the numbers are illustrative.)

How the audit counts it

PERF-001 is a warning in the performance category, and weighs moderately in that category’s score. When it appears on many pages built from the same template, the report shows it once, with the number of pages it covers — because one change in the template fixes all of them.

If the finding is deliberate on your site, it can be accepted as intentional in the report. It then leaves the list and the score, and comes back on its own if what it shows changes.

Other performance checks

Find it on your site

A Trakis audit runs this check and the other 65 on your site, and tells you on how many pages each one sits. Or go back to all the rules.