My theme uses header_image(); function to echo out a header image <img src="..."> it is set to 200x50px with add_theme_support(...); - all good here. My problem comes when I want to get the url of retina sized version of the image. Tried get_header_image(); but it doesn't accept any parameters so can't pass custom size (400x100px). How can I (using WP's header_image();) get the url of the retina-size version (400x100px) of the standard (200x50px) header image?

If it's not possible maybe we could try setting the default image demensions to 400x100px and resizing it down to 200x50px, and getting the url of a resized image?

Basically, I want to get two urls with the use of wp's core function - header_image();, one with 200x50px dimensions and one with 400x100px dimensions.


If you download the Retina plugin. It automatically edits the line for you. Generating a retina image.

  • This is a very minimal answer-- not so much as a link to the plugin, and even with a link it would be less than adequate. Please browse the Help center – s_ha_dum Nov 21 '15 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.