Using Printf Command - Width and Height problem
I am having a problem specifying the width and height using the printf command.
The code is as below:
printf(' <a href="'.get_term_link( $term ).'" style="color:%s;" data-javo-category="%s"> <img src="%s" style="width:300px; height:200px;"> <span style="font-size:%s'.'px;">%s</span> <div class="categories-wrap-shadow"></div> <div class="inner-meta %s"> <!-- <div>%s</div> --> <!-- <small>%s</small> --> <div class="cat-title">'.$term->name.'</div> <div class="cat-des">'.$term->description.'</div> <?php endif; ?> </div> </a>' , $title_text_color , $term->term_id , $featured , $category_size , $term->name , ( $display_item_count == 'hide' ? 'hidden' : '' ) , $term->name , javo_get_count_in_taxonomy( $term->term_id ) );
When I perform speed analysis using GTMetrix, it says that "image(s) are missing width and/or height attributes." If I put it as follows:
width="300" and height="200"
If I delete the width and height specifications from here and put it in the stylesheet, still it does have the same warning in GTMetrix
Please help me to correctly specify the size in this command so that it doesn't give warnings in GTMetrix
Cheers, John
Codeboss -- Useful Software Tailored For Your Business
Cheers, John
Codeboss -- Useful Software Tailored For Your Business