The multiple choice image tags do not include a width or height in the HTML.
This causes Google Lighthouse to complain about the following issue: “Image elements do not have explicit width and height”.
The Addons CSS (/wp-content/plugins/woocommerce-product-addons/assets/css/frontend/frontend.css) sets a max width and max height so it would be useful to just include the height and width on the image too.
e.g. inspect one of the addon image elements on this products cart form https://ohcoco.au/product/name-puzzle/ and it will only have src and alt tags on the image. It should also include width and height
Last updated: September 4, 2024
Log in to comment on this feature request.
Including width and height attributes in image HTML tags is a useful improvement for website performance and layout stability. Accurate image dimensions help prevent unexpected layout shifts and make pages more consistent across devices. These dimensions also matter when comparing visual proportions and understanding height differences. You can explore practical height comparisons at https://easyheightcomparison.com/.