Code Duplication    Length = 6-6 lines in 2 locations

class.jetpack-post-images.php 2 locations

@@ 633-638 (lines=6) @@
630
			$media = self::from_gallery( $post_id );
631
		if ( !$media && $args['from_attachment'] )
632
			$media = self::from_attachment( $post_id, $args['width'], $args['height'] );
633
		if ( ! $media && $args['from_blocks'] ) {
634
			if ( empty( $args['html_content'] ) )
635
				$media = self::from_blocks( $post_id, $args['width'], $args['height'] ); // Use the post_id, which will load the content
636
			else
637
				$media = self::from_blocks( $args['html_content'], $args['width'], $args['height'] ); // If html_content is provided, use that
638
		}
639
		if ( !$media && $args['from_html'] ) {
640
			if ( empty( $args['html_content'] ) )
641
				$media = self::from_html( $post_id, $args['width'], $args['height'] ); // Use the post_id, which will load the content
@@ 639-644 (lines=6) @@
636
			else
637
				$media = self::from_blocks( $args['html_content'], $args['width'], $args['height'] ); // If html_content is provided, use that
638
		}
639
		if ( !$media && $args['from_html'] ) {
640
			if ( empty( $args['html_content'] ) )
641
				$media = self::from_html( $post_id, $args['width'], $args['height'] ); // Use the post_id, which will load the content
642
			else
643
				$media = self::from_html( $args['html_content'], $args['width'], $args['height'] ); // If html_content is provided, use that
644
		}
645
646
		if ( !$media && $args['fallback_to_avatars'] ) {
647
			$media = self::from_blavatar( $post_id, $args['avatar_size'] );