• Resolved arzack

    (@arzack)


    I’m getting this message from Google Page Speed:
    Image elements have no explicit width and height
    I have this warning ONLY if I have two photos in the product sheet, this is the class of the image

    class = "flex-active" draggable = "false">

    This is the 100×100 thumbnail, all the other images have the dimensions and do not give problems, if I delete the second photo obviously the problem does not show up
    How can I fix this.
    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello @arzack ,

    By default, WooCommerce image sizes have the height, width set in the img tag. Is the image is on a WooCommerce page?

    Can you please share the page URL where you have the image?

    Looking forward to your response.

    Thank you 🙂

    Thread Starter arzack

    (@arzack)

    I apologize for the delay, but I have changed my connection and been offline…

    Yes, woocommerce sets both height and width for main images, but does not set size for additional images.
    Those with the red circle in the photo

    https://ibb.co/dJkTYp1

    This is the product page, but it is for all pages where there are more than one photo

    pag

    • This reply was modified 3 years, 4 months ago by arzack.
    • This reply was modified 3 years, 4 months ago by arzack.
    • This reply was modified 3 years, 4 months ago by arzack.
    • This reply was modified 3 years, 4 months ago by arzack.
    • This reply was modified 3 years, 4 months ago by arzack.
    • This reply was modified 3 years, 4 months ago by arzack.

    Hello @arzack ,

    Okay, I understand the exact problem you are referring to.

    At the moment WooCommerce does not seem to provide an option to include the width & height attribute on the gallery thumbnails. You can submit this as an enhancement request on our GitHub page.

    Thank you 🙂

    Thread Starter arzack

    (@arzack)

    Thanks

    I hope the developer team will take a look at this soon.

    I am going to mark this thread as resolved. If you have any other queries, feel free to open a new thread.

    Thank you 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Image elements have no explicit width and height’ is closed to new replies.