Saves current in-memory image to file.
$destfilenamestring|nulloptional
Default:null
$mime_typestring|nulloptional
Default:null
path stringfile stringwidth intheight intmime-type stringfilesize intpublic function save( $destfilename = null, $mime_type = null ) {
$saved = $this->_save( $this->image, $destfilename, $mime_type );
if ( ! is_wp_error( $saved ) ) {
$this->file = $saved['path'];
$this->mime_type = $saved['mime-type'];
}
return $saved;
}
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_image_editor_gd/save