On this page
apply_filters_deprecated( 'wp_save_image_file', bool|null $override, string $filename, resource|GdImage $image, string $mime_type, int $post_id )
This hook has been deprecated. Use ‘wp_save_image_editor_file’ instead.
Filters whether to skip saving the image file.
Description
Returning a non-null value will short-circuit the save method, returning that value instead.
Parameters
$overridebool|null-
Value to return instead of saving. Default null.
$filenamestring-
Name of the file to be saved.
$imageresource|GdImage-
Image resource or GdImage instance.
$mime_typestring-
The mime type of the image.
$post_idint-
Attachment post ID.
Source
File: wp-admin/includes/image-edit.php. View all references
$saved = apply_filters_deprecated(
'wp_save_image_file',
array( null, $filename, $image, $mime_type, $post_id ),
'3.5.0',
'wp_save_image_editor_file'
);
Related
Used By
| Used By | Description |
|---|---|
| wp_save_image_file() wp-admin/includes/image-edit.php | Saves image to file. |
Changelog
| Version | Description |
|---|---|
| 3.5.0 | Use 'wp_save_image_editor_file' instead. |
| 2.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_save_image_file