• Resolved Metin

    (@granices)


    hello woocommerce family and users. I can’t seem to resolve a Google Pagespeed related error on the woocommerce product page. It wants Google Pagespeed sizing on thumbnails. Do you have any suggestions for this error?

    error description ; Image elements do not have explicit width and height values

    Page

    • This topic was modified 3 years, 8 months ago by Metin.
    • This topic was modified 3 years, 8 months ago by Metin.
    • This topic was modified 3 years, 8 months ago by Metin.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi there ??

    We have an excellent post from us in which we discuss this in detail. Please feel free to read it:

    https://woocommerce.com/posts/optimize-images-for-web/

    Cheers ??

    Thread Starter Metin

    (@granices)

    Thank you very much for your interest . I am using image compressor. I need to specify height and width with codes.

    img src=https://granices.com/wp-content/uploads/2016/12/pi-white-granit-100×100.jpg

    • This reply was modified 3 years, 8 months ago by Metin.
    • This reply was modified 3 years, 8 months ago by Metin.
    • This reply was modified 3 years, 8 months ago by Metin.
    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    I see! Let’s try defining those thumbnails sizes with some CSS to see if that helps. Under Customize > Additional CSS, you can add the following code:
    ?

    /* Set Width and height for gallery thumbnails */
    .single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img {
        height: 85px !important;
        width: 85px !important;
        max-width: 85px !important;
    }
    

    ?
    If you’d like to learn more about CSS, I highly recommend using the free tutorials at w3schools. Here, you can find the basics of selectors (how to target the right element on the page), and properties (how to change the element on the page).

    Cheers.

    Thread Starter Metin

    (@granices)

    I ran additional Css code. automatic Thumbnail rebuild is running in the background. This may take some time, depending on the amount of images in your store.

    Thread Starter Metin

    (@granices)

    Thumbnail creation is working in the background. wait. but i have good news i see no error in Pagespeed test ??

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    That’s wonderful ??

    Great! I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Cheers.

    Thread Starter Metin

    (@granices)

    Thank you

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘product thumbnail size’ is closed to new replies.