Index: tests/phpunit/tests/media.php
--- tests/phpunit/tests/media.php Base (BASE)
+++ tests/phpunit/tests/media.php Locally Modified (Based On LOCAL)
@@ -443,4 +443,35 @@
 		$this->assertTrue( has_image_size( 'test-size' ) );
 	}
 
+	/**
+	 * @ticket 30320
+	 */
+	function test_attachment_is_image() {
+		$filename		 = 'CapitalExt.JPG';
+		$filetype		 = wp_check_filetype( basename( $filename ), null );
+		$wp_upload_dir	 = wp_upload_dir();
+
+		//Add an attachment with the post_mime_type.
+		$attachment	 = array(
+			'guid'			 => $wp_upload_dir[ 'url' ] . '/' . basename( $filename ),
+			'post_title'	 => preg_replace( '/\.[^.]+$/', '', basename( $filename ) ),
+			'post_content'	 => '',
+			'post_status'	 => 'inherit',
+			'post_mime_type' => $filetype[ 'type' ],
+		);
+		// Insert the attachment.
+		$attach_id	 = wp_insert_attachment( $attachment, $filename );
+		$this->assertTrue( wp_attachment_is_image( $attach_id ) );
+
+		//Add an attachment without the post_mime_type.
+		$attachment	 = array(
+			'guid'			 => $wp_upload_dir[ 'url' ] . '/' . basename( $filename ),
+			'post_title'	 => preg_replace( '/\.[^.]+$/', '', basename( $filename ) ),
+			'post_content'	 => '',
+			'post_status'	 => 'inherit'
+		);
+		// Insert the attachment.
+		$attach_id	 = wp_insert_attachment( $attachment, $filename );
+		$this->assertFalse( wp_attachment_is_image( $attach_id ) );
 }
+}
