Code Duplication    Length = 6-6 lines in 2 locations

class.jetpack-post-images.php 2 locations

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