Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header images should use get_header_image_tag() #324

Open
raamdev opened this issue Nov 8, 2021 · 0 comments · May be fixed by #325
Open

Header images should use get_header_image_tag() #324

raamdev opened this issue Nov 8, 2021 · 0 comments · May be fixed by #325
Assignees
Milestone

Comments

@raamdev
Copy link
Owner

raamdev commented Nov 8, 2021

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.

@raamdev raamdev added this to the Next Release milestone Nov 8, 2021
@raamdev raamdev self-assigned this Nov 8, 2021
@raamdev raamdev linked a pull request Nov 8, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant