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:

  • jpg
  • jpeg
  • jpe
  • png
  • gif

Top ↑

Parameters

$allowed_extensions

(string[]) Array of allowed file extensions.

$file

(string) The URL of the image to download.


Top ↑

Source

File: wp-admin/includes/media.php

View on Trac



Top ↑

Changelog

Changelog
Version Description
5.6.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.