Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've made an option to allow users to upload a custom background image to their site using the Customize theme section of wordpress but I'm having trouble uploading large (in pixels) images.

An image 900px and 200kb works fine but when I try and upload something 4000px wide it just won't do it, even when the image is small in size (38kb)

This seems to make not sense to me, I could understand it if there was a limit to size on the disk but I can't understand how the pixel size could make a difference!

This is my code in case:

// This bit adds a custom image to the background
$wp_customize->add_section( 'background_image_section' , array(
    'title'       => 'Background Image',
    'priority'    => 30,
    'description' => 'Upload a background image to replace the default background',
) );

$wp_customize->add_setting( 'background_image',
        'default'      => '',
        'transport'    => 'postMessage'

$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'background_image', array(
    'label'    => 'Background Image',
    'section'  => 'background_image_section',
    'settings' => 'background_image',
) ) );

I'm using 3.6.1 for this site

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.