Resize not resizing images with Capitial extension like JPG

This happens because capital letter like JPG,JPEG,GIP are not the allowed mime types in wordpress.

For list of allowed mime types check the codex.

Now to get your code work, you need to add the capital mime types into the allowed mime types.

You can do it by adding the following code in your active theme’s functions.php file

add_filter( 'mime_types', 'wpse125310_mime_types' );
function wpse125310_mime_types( $output ) {
    $output['JPG'] = 'image/JPG';
    $output['JPEG'] = 'image/JPEG';
    $output['GIP'] = 'image/GIP';

    return $output;
}

You can add other mimetypes to the above too.