Title: wp_is_stream
Published: April 25, 2014
Last modified: February 24, 2026

---

# wp_is_stream( string $path ): bool

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/wp_is_stream/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_is_stream/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_is_stream/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_is_stream/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_is_stream/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_is_stream/?output_format=md#wp--skip-link--target)

Tests if a given path is a stream URL

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_is_stream/?output_format=md#parameters)󠁿

 `$path`stringrequired

The resource path or URL.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_is_stream/?output_format=md#return)󠁿

 bool True if the path is a stream URL.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_is_stream/?output_format=md#source)󠁿

    ```php
    function wp_is_stream( $path ) {
    	$scheme_separator = strpos( $path, '://' );

    	if ( false === $scheme_separator ) {
    		// $path isn't a stream.
    		return false;
    	}

    	$stream = substr( $path, 0, $scheme_separator );

    	return in_array( $stream, stream_get_wrappers(), true );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/functions.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/functions.php#L7373)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/functions.php#L7373-L7384)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_is_stream/?output_format=md#related)󠁿

| Used by | Description | 
| [WP_Image_Editor_Imagick::write_image()](https://developer.wordpress.org/reference/classes/wp_image_editor_imagick/write_image/)`wp-includes/class-wp-image-editor-imagick.php` |

Writes an image to a file or stream.

  | 
| [wp_delete_file_from_directory()](https://developer.wordpress.org/reference/functions/wp_delete_file_from_directory/)`wp-includes/functions.php` |

Deletes a file if its path is within the given directory.

  | 
| [WP_Image_Editor_Imagick::load()](https://developer.wordpress.org/reference/classes/wp_image_editor_imagick/load/)`wp-includes/class-wp-image-editor-imagick.php` |

Loads image from $this->file into new Imagick Object.

  | 
| [wp_mkdir_p()](https://developer.wordpress.org/reference/functions/wp_mkdir_p/)`wp-includes/functions.php` |

Recursive directory creation based on full path.

  | 
| [path_is_absolute()](https://developer.wordpress.org/reference/functions/path_is_absolute/)`wp-includes/functions.php` |

Tests if a given filesystem path is absolute.

  | 
| [wp_normalize_path()](https://developer.wordpress.org/reference/functions/wp_normalize_path/)`wp-includes/functions.php` |

Normalizes a filesystem path.

  | 
| [WP_Image_Editor::generate_filename()](https://developer.wordpress.org/reference/classes/wp_image_editor/generate_filename/)`wp-includes/class-wp-image-editor.php` |

Builds an output filename based on current file, and adding proper suffix

  | 
| [WP_Image_Editor::make_image()](https://developer.wordpress.org/reference/classes/wp_image_editor/make_image/)`wp-includes/class-wp-image-editor.php` |

Either calls editor’s save function or handles file as a stream.

  | 
| [WP_Image_Editor_GD::make_image()](https://developer.wordpress.org/reference/classes/wp_image_editor_gd/make_image/)`wp-includes/class-wp-image-editor-gd.php` |

Either calls editor’s save function or handles file as a stream.

  |

[Show 4 more](https://developer.wordpress.org/reference/functions/wp_is_stream/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wp_is_stream/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_is_stream/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.5.0](https://developer.wordpress.org/reference/since/3.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_is_stream%2F)
before being able to contribute a note or feedback.