Filter hook 'image_sideload_extensions'

in WP Core File wp-admin/includes/media.php at line 1038

Description

Filters the list of allowed file extensions when sideloading an image from a URL. The default allowed extensions are: - `jpg` - `jpeg` - `jpe` - `png` - `gif` - `webp`

Occurrences

Filename Line Number
wp-admin/includes/media.php 1038

Parameters

Type Name Description
string[] $allowed_extensions Array of allowed file extensions.
string $file The URL of the image to download.

PHP Doc

/**
		 * Filters the list of allowed file extensions when sideloading an image from a URL.
		 *
		 * The default allowed extensions are:
		 *
		 *  - `jpg`
		 *  - `jpeg`
		 *  - `jpe`
		 *  - `png`
		 *  - `gif`
		 *  - `webp`
		 *
		 * @since 5.6.0
		 * @since 5.8.0 Added 'webp' to the default list of allowed file extensions.
		 *
		 * @param string[] $allowed_extensions Array of allowed file extensions.
		 * @param string   $file               The URL of the image to download.
		 */