Filters the GD image resource to be streamed to the browser.
$imageresource|GdImage$attachment_idintwp-admin/includes/image-edit.php:380wp_stream_image()wp-admin/includes/image-edit.php:467wp_save_image_file() * @since 2.9.0 * @deprecated 3.5.0 Use {@see 'image_editor_save_pre'} instead. * * @param resource|GdImage $image Image resource to be streamed. * @param int $attachment_id The attachment post ID. */ $image = apply_filters_deprecated( 'image_save_pre', array( $image, $attachment_id ), '3.5.0', 'image_editor_save_pre' ); switch ( $mime_type ) { case 'image/jpeg': header( 'Content-Type: image/jpeg' ); return imagejpeg( $image, null, 90 ); case 'image/png':Introduced in 2.9.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.