JointWP – Can't add custom images sizes

I am trying to add a custom image size in the functions.php file.

add_image_size( 'Portrait', 1200, 1800, false );

add_image_size( 'Featured', 2560, 1600, true );

This is the newest version with foundation 6. Am I putting it in the wrong file?

Thanks for any help.

Solutions Collecting From Web of "JointWP – Can't add custom images sizes"

You have added this code in the correct file (i.e. function.php).
This function will crop the image in given size only if you have uploaded the image which has bigger size than defined size in add_image_size() function.

So please upload the image with the size bigger than 2560*1600 and check.

Considering you tried to add that in the functions.php of your theme.

There is one other functions.php file in WordPress install

add_image_size you can add after_setup_theme hook.

Here is how 2014-teen theme did it.

function twentyfourteen_setup() { 

    add_image_size( 'twentyfourteen-full-width', 1038, 576, true );

add_action( 'after_setup_theme', 'twentyfourteen_setup' );

You can copy the design but use your function names.