Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1485154

    Hello,
    when i test my site with Catchpoint, i have this:

    Layout shifts exist and may be caused by images missing aspect ratio.

    The CLS score is 0.23. 1 layout-critical imageis lacking an aspect ratio, meaning the browser has no way of knowing how tall or wide an image is until it loads. This can cause content to shift as the image loads.

    https://sitewebdiscount.com/wp-content/uploads/2025/05/Photo-Pierre-Martin.jpg.webp

    Relevant Experiments

    Add Aspect Ratio to Images

    This experiment adds width=”…” and height=”…” attributes to specified images, matching their natural width and height, to provide an aspect ratio.

    I checked in the code and i notice that the width and the height aren’t defined for this picture…
    How can i resolve this?
    I noticed too in the source code that the alt is empty alt=” althought i declared it…
    And i noticed that it’s the same for the others pictures….

    Could you explain me why?

    Thanks for your help!

    #1485164

    Hi,
    i resolved my problem, It came from my polylang plugin.. some media were not translated..

    #1485186

    Hi,

    Thanks for the update, we’ll close this thread for now then. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘width and height are not defined’ is closed to new replies.