#38847 closed defect (bug) (fixed)
Twenty Seventeen: Header Image used is smaller than 2000x1200px
Reported by: | transl8or | Owned by: | joemcgill |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | ui | Cc: |
Description
This is also reported in the Alpha/Beta Forum and I could reproduce it on my localhost:
- Went to Customize > Header Media > Header Image + Add new image
- Uploaded a 2,5 MB image with 3840x2160 px
- Cropped the image (no adjustment of the suggested frame)
- The file that is than used as header image is 768x461 px (37 kB) and stretched. Slightly blurry.
But the image is availabe with 2000x1200 px in the upload folder.
When I use this from the media library as featured image for a post, the bigger 2000x1220 px picture (170kb) is used there, and not the smaller one, like the header does.
Going to the Customizer and choosing another already uploaded image as header image with 2000x1200 px and not cropping it, does also use the 768x461 px file variant as header image.
Attachments (2)
Change History (6)
#1
@
8 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 4.7
- Owner set to joemcgill
- Status changed from new to accepted
Note: See
TracTickets for help on using
tickets.
Hi @transl8or – thanks for the report!
This looks to be an issue of the
sizes
attribute being calculated incorrectly, resulting in the browser downloading the wrong resource. 38847.diff adds a filter to the markup generated byget_header_image_tag()
to correct this problem.Before the filter, the
img
contained:sizes="(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px"
And after:
sizes="100vw"