• Hi,

    I am using Twenty-Fourteen Theme and I customized it. My feature images are being scaled down to 1038px x 576px making them blurry. The feature image in the link below was uploaded as 1920px x 1269px.

    I found this code in the function.php file:

    // Enable support for Post Thumbnails, and declare two sizes.
    	add_theme_support( 'post-thumbnails' );
    	set_post_thumbnail_size( 672, 372, true );
    	add_image_size( 'twentyfourteen-full-width', 1038, 576, true );

    So I changed it in my child theme functions.php file to:

    if ( function_exists( 'add_theme_support' ) ) {
    	add_theme_support( 'post-thumbnails' );
    	set_post_thumbnail_size( 150, 150, true );
    	add_image_size( 'portfolio', 295, 150, true );
    	add_image_size( 'twentyfourteen-full-width', 1920, 1269, true );
    }

    I tried adding this line to my css:

    img.attachment-twentyfourteen-full-width {
    	width: 1920px;
    }

    Neither worked. I have run out of ideas. Here is the link:

    http://www.patrickahearn.com/houses/31-south-water-street/

Viewing 1 replies (of 1 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Don’t do this:

    if ( function_exists( 'add_theme_support' ) ) {
    	add_theme_support( 'post-thumbnails' );
    	set_post_thumbnail_size( 150, 150, true );
    	add_image_size( 'portfolio', 295, 150, true );
    	add_image_size( 'twentyfourteen-full-width', 1920, 1269, true );
    }

    Do this:

    set_post_thumbnail_size( 150, 150, true );
    	add_image_size( 'portfolio', 295, 150, true );
    	add_image_size( 'twentyfourteen-full-width', 1920, 1269, true );

    But wait, which image size do you want? Also you should use a unique handle name. I’d combine it with the name of your child theme

Viewing 1 replies (of 1 total)

The topic ‘Feature Image Size Overwritten’ is closed to new replies.