wppaste
WordPress

apply_filters( 'image_save_progressive', bool $interlace, string $mime_type )

Since
6.5.0
Filters whether to output progressive images (if available).

Compatibility

WordPress
since 6.5.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$interlacebool
Whether to use progressive images for output if available. Default false.
$mime_typestring
The mime type being saved.

Where this hook fires · 3

  • wp-includes/class-wp-image-editor-gd.php:539WP_Image_Editor_GD::_save()
  • wp-includes/class-wp-image-editor-imagick.php:1143WP_Image_Editor_Imagick::_save()
  • wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php:1604WP_REST_Attachments_Controller::prepare_item_for_response()

Source code

			 *			 * @since 6.5.0			 *			 * @param bool   $interlace Whether to use progressive images for output if available. Default false.			 * @param string $mime_type The mime type being saved.			 */			imageinterlace( $image, apply_filters( 'image_save_progressive', false, $mime_type ) );		} 		if ( 'image/gif' === $mime_type ) {			if ( ! $this->make_image( $filename, 'imagegif', array( $image, $filename ) ) ) {				return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) );			}

Changelog

Introduced in 6.5.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.