image_save_progressive

image_save_progressive

Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('image_save_progressive') is found 2 times:

  • /wp-includes/class-wp-image-editor-gd.php line 509
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
         *
         * @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' ) );
        }
  • /wp-includes/class-wp-image-editor-imagick.php line 841
    837
    838
    839
    840
    841
    842
    843
    844
    845
    846
    ) {
        $orig_interlace = $this->image->getInterlaceScheme();
     
        /** This filter is documented in wp-includes/class-wp-image-editor-gd.php */
        if ( apply_filters( 'image_save_progressive', false, $mime_type ) ) {
            $this->image->setInterlaceScheme( Imagick::INTERLACE_PLANE ); // True - line interlace output.
        } else {
            $this->image->setInterlaceScheme( Imagick::INTERLACE_NO ); // False - no interlace output.
        }
    }