Code Duplication    Length = 6-6 lines in 2 locations

class.jetpack-post-images.php 2 locations

@@ 625-630 (lines=6) @@
622
			$media = self::from_gallery( $post_id );
623
		if ( !$media && $args['from_attachment'] )
624
			$media = self::from_attachment( $post_id, $args['width'], $args['height'] );
625
		if ( ! $media && $args['from_blocks'] ) {
626
			if ( empty( $args['html_content'] ) )
627
				$media = self::from_blocks( $post_id, $args['width'], $args['height'] ); // Use the post_id, which will load the content
628
			else
629
				$media = self::from_blocks( $args['html_content'], $args['width'], $args['height'] ); // If html_content is provided, use that
630
		}
631
		if ( !$media && $args['from_html'] ) {
632
			if ( empty( $args['html_content'] ) )
633
				$media = self::from_html( $post_id, $args['width'], $args['height'] ); // Use the post_id, which will load the content
@@ 631-636 (lines=6) @@
628
			else
629
				$media = self::from_blocks( $args['html_content'], $args['width'], $args['height'] ); // If html_content is provided, use that
630
		}
631
		if ( !$media && $args['from_html'] ) {
632
			if ( empty( $args['html_content'] ) )
633
				$media = self::from_html( $post_id, $args['width'], $args['height'] ); // Use the post_id, which will load the content
634
			else
635
				$media = self::from_html( $args['html_content'], $args['width'], $args['height'] ); // If html_content is provided, use that
636
		}
637
638
		if ( !$media && $args['fallback_to_avatars'] ) {
639
			$media = self::from_blavatar( $post_id, $args['avatar_size'] );