WordPress: Header image size?

WordPress Question:

In the “Header Image” section of my WordPress dashboard, it indicates, “Images of exactly 1280 × 416 pixels will be used as-is.” But when I upload an image of that size, the image is cropped at the top and bottom (I’m using the Hemingway theme). Plus, when I do an “Inspect Element” on the header image, it indicates the image is only 1214 x 243 pixels. Yet there appears to be no cropping in the x-direction. Both of these are unexpected considering the WordPress instructions on the header page. Can someone shed some light on this?
Thanks in advance.

Read More

edit: fwiw my site is www.panyadee.ac.th/test/

Related posts

Leave a Reply

2 comments

  1. Take a look in your theme’s functions.php file for add_theme_support. This function registers support for the custom header image. Regarding the width and height of the default image, you can pass some $args like this:

    $default_args = array(
        'default-image'          => '',
        'random-default'         => false,
        'width'                  => 0,
        'height'                 => 0,
        'flex-height'            => false,
        'flex-width'             => false,
        'default-text-color'     => '',
        'header-text'            => true,
        'uploads'                => true,
        'wp-head-callback'       => '',
        'admin-head-callback'    => '',
        'admin-preview-callback' => '',
    );
    add_theme_support( 'custom-header', $default_args );
    

    Try making sure that height and width are set.

    Ref: http://codex.wordpress.org/Function_Reference/add_theme_support

  2. WordPress cuts some area to provide an option to crop the uploaded image. You need to extend the bottom area from the cropping region according to your mentioned size.