On this page
WP_Image_Editor::save( string $destfilename = null, string $mime_type = null ): array|WP_Error
Saves current image to file.
Parameters
$destfilenamestring Optional-
Destination filename.
Default:
null $mime_typestring Optional-
The mime-type.
Default:
null
Return
array|WP_Error Array on success or WP_Error if the file failed to save.
pathstringPath to the image file.filestringName of the image file.widthintImage width.heightintImage height.mime-typestringThe mime type of the image.filesizeintFile size of the image.
Source
File: wp-includes/class-wp-image-editor.php. View all references
abstract public function save( $destfilename = null, $mime_type = null );
Changelog
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_image_editor/save