On this page
apply_filters( 'image_sideload_extensions', string[] $allowed_extensions, string $file )
Filters the list of allowed file extensions when sideloading an image from a URL.
Description
The default allowed extensions are:
jpgjpegjpepnggif
Parameters
$allowed_extensionsstring[]-
Array of allowed file extensions.
$filestring-
The URL of the image to download.
Source
File: wp-admin/includes/media.php. View all references
$allowed_extensions = apply_filters( 'image_sideload_extensions', $allowed_extensions, $file );
Related
Used By
| Used By | Description |
|---|---|
| media_sideload_image() wp-admin/includes/media.php | Downloads an image from the specified URL, saves it as an attachment, and optionally attaches it to a post. |
Changelog
| Version | Description |
|---|---|
| 5.6.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/image_sideload_extensions