Home › Forums › Support › Media Attachment Size for Header Element Background Image This topic has 3 replies, 2 voices, and was last updated 3 years, 10 months ago by David. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts May 24, 2020 at 11:36 pm #1300019 Jesse Can the Media Attachment Size set in Customiser be applied to the Background Image of Header Elements instead of always pulling in the full image size? May 25, 2020 at 2:59 am #1300206 DavidStaff Customer Support Hi there, interesting idea – not an option at the moment but you can use this PHP snippet to change it: add_filter( 'generate_page_hero_background_image_url', function( $image_url, $options ) { if ( is_singular() && has_post_thumbnail() ) { $image_url = get_the_post_thumbnail_url( get_the_ID(), 'large' ); } return $image_url; }, 10, 2 ); May 25, 2020 at 8:43 pm #1301403 Jesse Awesome! That helps with performance a bit 🙂 Using an image shortcode may have been better, but this is great where a background image is used. I realised that having this as an option may cause issues with the parallax setting if the chosen size isn’t big enough. Thanks! May 26, 2020 at 1:50 am #1301643 DavidStaff Customer Support You’re welcome Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In