• Resolved Gal Baras

    (@galbaras)


    When analysing pages using Google Lighthouse, the Best Practices section lists wpDiscuz avatars under “Displays images with incorrect aspect ratio”.

    A close inspection shows that the style selector #wpdcom.wpd-layout-2 .wpd-comment .wpd-avatar img, #wpdcom.wpd-layout-2 .wpd-comment .wpd-avatar img.avatar has the following styles:

    width: 48px;
    height: 48px;
    max-width: 48px;
    border-bottom: 2px solid #cccccc;
    padding: 1px;

    This causes the browser to allocate only 46×44 pixels for the image, which is not the correct aspect ratio for a 64×64 pixel image.

    Fixing this (minor issue) can help site owners score more points for best practices.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author AdvancedCoding

    (@advancedcoding)

    Hi @galbaras
    You can change the size of avatars. Read this doc please.

    Thread Starter Gal Baras

    (@galbaras)

    That was no my point at all. Gravatars are all square and the styling changes the aspect ratio, regardless of the actual size.

    This issue can be easily resolved by adding the style box-sizing: content-box;, but I would also change padding: 1px; to padding: 0;.

    Plugin Author AdvancedCoding

    (@advancedcoding)

    Hi Gal Baras,

    Thank you for sharing this information with us.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Gravatar displayed using incorrect aspect ratio’ is closed to new replies.