Below Navigation Image, width and height attributes missing
-
For the Below Navigation Image, in WordPress also called Header Image, the
widthandheightattributes are missing. This slows down page rendering, especially on mobile devices.Current code in
header.php, line 111:<img src="<?php echo esc_url(( get_header_image()) ); ?>" alt="<?php echo( get_bloginfo( 'title' ) ); ?>" />Suggested fix:
<?php echo get_header_image_tag( array( 'alt' => get_bloginfo( 'title' ) ) ); ?>Example output of fix with attributes present:
<img src="[redacted]/wp-content/themes/responsiveblogily/inc/starter_content/img/header-img.statopt_ver.1755767639.png" width="1200" height="500" alt="My WPSandbox site" decoding="async" fetchpriority="high" />ResponsiveBlogily 7.2, WordPress 6.8.2
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Below Navigation Image, width and height attributes missing’ is closed to new replies.
