apply_filters( ‘image_editor_output_format’, string[] $output_format, string $filename, string $mime_type )

Filters the image editor output format mapping.

Description

Enables filtering the mime type used to save images. By default HEIC/HEIF images are converted to JPEGs.

See also

Parameters

$output_formatstring[]
An array of mime type mappings. Maps a source mime type to a new destination mime type. By default maps HEIC/HEIF input to JPEG output.
  • ...$0 string
    The new mime type.
$filenamestring
Path to the image.
$mime_typestring
The source image mime type.

Source

return apply_filters( 'image_editor_output_format', $output_format, $filename, $mime_type );

Changelog

VersionDescription
6.7.0The default was changed from an empty array to an array containing the HEIC/HEIF images mime types.
5.8.0Introduced.

User Contributed Notes

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