humanmade / humanmade/tachyon-plugin
Header Image URL not Handled
- Dominant language
- PHP
- Stars
- 86
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
When using Tachyon, a single header image doesn't have its image URL tachyoned.
This appears to be because a single header image is never passed through `image_downsize` - it is called directly from `get_theme_mod` where the URL is saved as text. Ref: https://github.com/WordPress/WordPress/blob/master/wp-includes/theme.php#L1052
It looks like this can be filtered via [`get_header_image_tag`](https://github.com/WordPress/WordPress/blob/master/wp-includes/theme.php#L1129) or, even better via [`theme_mod_header_image`](https://github.com/WordPress/WordPress/blob/master/wp-includes/theme.php#L911).
For randomized headers, we might want to filter `wp_get_attachment_url` as they pass through a different function. This doesn't appear to pass through `image_downsize` but I might be missing something.
Worth noting: the srcset for the header image is correctly techyoned, it's the main header image URL that is incorrect.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.