add_image_size adds size, but doesn’t upload if source resolution is same as resize resolution
I have added an image size <?php add_image_size( ‘test’, 300, 300, true ); ?> Uploaded an image of exactly 300 x 300px, Then got the image <?php wp_get_attachment_image_src( $id, array(300,300) );?> or <?php wp_get_attachment_image_src( $id, ‘test’ );?> Works both ways. Maybe you did not define the image size correctly in functions.php