As part of full WebP support in Backdrop 1.25.0, a toolkit-specific callback was added to list supported image extensions. Modules that provide image toolkits (such as ImageMagick), should provide a toolkit callback to list supported extensions.

Example callback:

function image_TOOLKIT_NAME_supported_extensions() {
  $supported_extensions = array('png', 'gif', 'jpg', 'jpeg');
  if (image_TOOLKIT_NAME_webp_support()) {
    $supported_extensions[] = 'webp';

  return $supported_extensions;

Where TOOLKIT_NAME is the name of the toolkit (usually matching the module name).

If a toolkit does not provide a list of extensions, then Backdrop assumes jpg, gif, and png support; and logs a watchdog message that the expected callback is missing.

Introduced in branch: 
Introduced in version: 
Module developers