Skip to content

Header images should use get_header_image_tag() #324

@raamdev

Description

@raamdev

Currently, the <img> tag for the header image is built manually in independent_publisher_posted_author_card():

<img class="no-grav" src="<?php echo esc_url( get_header_image() ); ?>" height="<?php echo absint( get_custom_header()->height ); ?>" width="<?php echo absint( get_custom_header()->width ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />

It would be better to use get_header_image_tag() to build this tag, as that will include the srcset attributes for responsive images automatically.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions