A WordPress-centric search engine for devs and theme authors

image_editor_output_format › WordPress Filter Hooks

apply_filters( 'image_editor_output_format', array()
Parameters: (3)
  • (array) $output_format { An array of mime type mappings. Maps a source mime type to a new destination mime type. Default empty array. @type array $mime_type The source mime type { @type string $mime_type The new mime type. }
    Required: Yes
  • (string) $filename Path to the image.
    Required: Yes
  • (string) $mime_type The source image mime type. }
    Required: Yes
Defined at:

Filters the image editor output format mapping.

Enables filtering the mime type used to save images. By default, the mapping array is empty, so the mime type matches the source image.


$output_format = apply_filters( 'image_editor_output_format', array(), $filename, $mime_type );