Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #311513

    Hi :)

    When i scan my website with GtMetrix, i have an important error :

    Specify image dimensions
    The following image(s) are missing width and/or height attributes.
    /wp-content/themes/enfold/config-layerslider/LayerSlider/static/img/blank.gif
    (Dimensions: 1 x 1) (25 uses)

    I don’t know in which file this picture is used, and where i can put width & height to fix the problem.

    Thanks a lot for your help

    #311664

    Hi mattv7!

    Thank you for using Enfold.

    Honestly, I don’t think it’s really that important. You can just ignore that one. The blank.gif image is automatically added by the layer slider plugin.

    Cheers!
    Ismael

    #311840

    Hi Ismael,

    Thank you for your answer. I know it’s not very important, but it’s an error F in GtMetrix and now my slider is done, so i would like to remove this error, could you just give me direction? where to look?

    Thanks a lot :)

    Cheers!
    Matthieu

    #313000

    Hi!

    Open up wp-content/themes/enfold/config-layerslider/LayerSlider/includes/slider_markup_html.php and replace:

    
    $data[] = '<img src="'.LS_ROOT_URL.'/static/img/blank.gif" data-src="'.$src.'" class="ls-bg" alt="Slide background" />';
    

    with

    
    $data[] = '<img src="'.LS_ROOT_URL.'/static/img/blank.gif" data-src="'.$src.'" height="1" width="1" class="ls-bg" alt="Slide background" />';
    

    and:

    
    $data[] = '<img src="'.LS_ROOT_URL.'/static/img/blank.gif" data-src="'.$src.'" class="ls-tn" alt="Slide thumbnail" />';
    

    with

    
    $data[] = '<img src="'.LS_ROOT_URL.'/static/img/blank.gif" data-src="'.$src.'" class="ls-tn" height="1" width="1" alt="Slide thumbnail" />';
    

    Best regards,
    Peter

    #313491

    Hi, if I do this, am I supposed to do it again everytime I update the theme?

    #313815

    Hey!

    Yes, that will be the case. Or you can purchase the layer slider then install it as a standalone plugin. Add this on functions.php to disable the default layer slider:

    add_theme_support( 'deactivate_layerslider' );
    

    Cheers!
    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.