Code Duplication    Length = 6-6 lines in 2 locations

class.jetpack-post-images.php 2 locations

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