Home Forums WoodMart support forum Set an explicit width and height on image elements to reduce layout shifts and i

Set an explicit width and height on image elements to reduce layout shifts and i

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #296398

    iraklimosidze
    Participant

    Hello.

    Gtmetrix showing

    “Set an explicit width and height on image elements to reduce layout shifts and improve CLS.”
    this error.
    how to slove this ?

    Attachments:
    You must be logged in to view attached files.
    #296541

    Artem Temos
    Keymaster

    Hi,

    Could you please send us a link to your website where we can see this issue?

    Kind Regards

    #296892

    iraklimosidze
    Participant
    #296901

    Artem Temos
    Keymaster

    Try to add the following PHP code snippet to the child theme functions.php file to do this

    add_filter( 'woodmart_megamenu_icon_attrs', function(){
    	return 'width="18" height="18"';
    } );
Viewing 4 posts - 1 through 4 (of 4 total)