Filters the maximum bit depth of resized images.
$max_depthint$image_depthintwp-includes/class-wp-image-editor-imagick.php:801WP_Image_Editor_Imagick::thumbnail_image()wp-includes/rest-api/class-wp-rest-server.php:1400WP_REST_Server::get_index() * * @since 6.8.0 * * @param int $max_depth The maximum bit depth. Default is the input depth. * @param int $image_depth The bit depth of the original image. */ $max_depth = apply_filters( 'image_max_bit_depth', $this->image->getImageDepth(), $this->image->getImageDepth() ); $this->image->setImageDepth( $max_depth ); } } catch ( Exception $e ) { return new WP_Error( 'image_resize_error', $e->getMessage() ); } }Introduced in 6.8.0. Unchanged from 6.8.8 through 7.1.0.
Signature, return type and hooks compared across 4 parsed releases.