WP_Image_Editor::get_output_format

SummerySummery

Returns preferred mime-type and extension based on provided file’s extension and mime, or current file’s extension and mime.

Syntax

WP_Image_Editor::get_output_format( string $filename = null, string $mime_type = null )

DescriptionDescription

Will default to $this->default_mime_type if requested is not supported.

Provides corrected filename only if filename is provided.

ParametersParameters

$filename

(string) (Optional)

Default value: null

$mime_type

(string) (Optional)

Default value: null

ReturnReturn

(array) filename|null, extension, mime-type

SourceSource

File: wp-includes/class-wp-image-editor.php


			

ChangelogChangelog

Changelog
Version Description
3.5.0 Introduced.
Scroll to Top