Code Duplication    Length = 4-4 lines in 2 locations

functions.opengraph.php 2 locations

@@ 321-324 (lines=4) @@
318
			$image_size = wp_get_attachment_image_src( $image_id, $width >= 512
319
				? 'full'
320
				: array( $width, $width ) );
321
			if ( isset( $image_size[1], $image_size[2] ) ) {
322
				$img_width  = $image_size[1];
323
				$img_height = $image_size[2];
324
			}
325
326
			if (_jetpack_og_get_image_validate_size($img_width, $img_height, $width, $height)) {
327
				$image['src']    = $image_url;
@@ 359-362 (lines=4) @@
356
		$image_size = wp_get_attachment_image_src( $image_id, $max_side >= 512
357
			? 'full'
358
			: array( $max_side, $max_side ) );
359
		if ( isset( $image_size[1], $image_size[2] ) ) {
360
			$img_width  = $image_size[1];
361
			$img_height = $image_size[2];
362
		}
363
364
		if (_jetpack_og_get_image_validate_size($img_width, $img_height, $width, $height)) {
365
			$image['src']     = $image_url;