Changing the Header Image tag (adding attribute)
-
Hi,
I would like to add an attribute to the image tag for the header image that loads up on the splash page in my 2017 themed sites.
<div id="wp-custom-header" class="wp-custom-header"> <img src="_the-image-url_" width="2000" height="1200" alt="_the-image-alt_"/> </div>
I’m trying to diagnose an issue where on iPad header images just give up rendering / downloading about 2/3 of the way through, and won’t show up correctly unless ypu manually open the image directly in a different tab, then reload the page and it’ll work.
I found a suggestion to try:
<img decoding="sync" src="@Url" />
So, given I’m working on a child theme, I’m assuming I have to do something in my functions.php to override the default function that generates that image tag, so as to add the decoding=”sync” attribute into it. I just can’t find the appropriate bit in the 2017 theme files.
Anyhelp would be appreciated, thanks.
BTW: while I might be able to solve this with a CSS media query, and creating a new stylesheet for iPad, I really want to try fixing it this way, just to see if it works. Thanks.
- The topic ‘Changing the Header Image tag (adding attribute)’ is closed to new replies.