• Resolved igorstb

    (@igorstb)


    When changing the button icon type (“Button icon type”) to an image, PageSpeed ​​Insights reports an error: “Image elements do not have explicit width and height values.” Specifically: “Style Settings” > “Button Icon Type” > “Custom Icon”.
    However, PageSpeed ​​Insights does not report this error if the image is used instead of the icon specified in the “Added Button icon” field.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @igorstb,

    Thank you very much for reporting this issue and for providing the detailed information.

    Our development team is currently investigating the behavior you described regarding the “Button Icon Type” → “Custom Icon” option and the PageSpeed Insights warning about missing explicit width and height values.

    Once the investigation is complete, we will work on a solution and include a fix as soon as possible if the issue is confirmed.

    In the meantime, you can also contact our support team directly through the following link for further assistance:

    https://portal.hasthemes.com/contact/

    Thank you for your patience and for helping us improve the plugin.

    Best regards,
    Kamal

    Hi @igorstb,

    Thank you for the detailed report — we were able to reproduce this.

    The issue was that the Style Settings > Button Icon Type > Custom Icon image was output without explicit width and height attributes, which is what PageSpeed Insights was flagging. (The “Added Button icon” field didn’t trigger it because that path already carried dimensions.)

    This is now fixed in version 1.5.6. Custom button icons are rendered with proper width/height (and responsive srcset where available), so the “Image elements do not have explicit width and height” warning no longer appears. Please update to 1.5.6 and clear any page/optimization cache, then re-run PageSpeed.

    If you still see the warning on a specific image after updating, please share the product URL so we can check it.

    A small request: to keep everything in one place, we’d really appreciate it if you could keep your questions and reports in a single support thread going forward. You’ve opened a few separate topics for the same plugin, and it’s much easier for us to track the full context, avoid duplicate answers, and respond faster when the conversation stays in one place.

    Best regards,
    Kamal

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

You must be logged in to reply to this topic.