Summery Summery
Saves current in-memory image to file.
Syntax Syntax
Parameters Parameters
- $filename
-
(Optional)
Default value: null
- $mime_type
-
(Optional)
Default value: null
Return Return
(array|WP_Error) 'path'=>string, 'file'=>string, 'width'=>int, 'height'=>int, 'mime-type'=>string
Source Source
File: wp-includes/class-wp-image-editor-gd.php
public function save( $filename = null, $mime_type = null ) { $saved = $this->_save( $this->image, $filename, $mime_type ); if ( ! is_wp_error( $saved ) ) { $this->file = $saved['path']; $this->mime_type = $saved['mime-type']; } return $saved; }
Advertisement
Changelog Changelog
Version | Description |
---|---|
3.5.0 | Introduced. |