**Short story:** 
I'm trying to get the ID of the Header Image in Wordpress.

All I found was this guide, which dosn't seem to work anymore:<http://nickohrn.com/2013/09/get-attachment-id-wordpress-header-image/>

**Long Story**
I'm trying to make the WP Header responsive with an srcset. so I don't want to use this code

```
<img id="masthead-bg" src="<?php header_image() ?>" alt=""> 

```

...but instead want to use the wp\_get\_attachment\_image\_srcset function to get the srcset of my header image. Only problem: I need an Image ID for this function -> The ID of my Header image.

```
<img id="masthead-bg" 
src="<?php header_image() ?>" 
srcset="<?php echo wp_get_attachment_image_srcset( image_id(), 'thumbnail' ); ?>" 
sizes="100vw" alt="">

```

Any suggestions?