Make WordPress Core


Ignore:
Timestamp:
08/31/2021 06:57:09 PM (3 years ago)
Author:
azaozz
Message:

Media: apply the wp_editor_set_quality filter not only when loading an image in the editor but also when saving an converted image, after the mime-type of the output image has changed.

Props mikeschroder, desrosj, azaozz.
Fixes #53667.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/mock-image-editor.php

    r48291 r51704  
    5757        }
    5858        public function save( $destfilename = null, $mime_type = null ) {
     59            // Set new mime-type and quality if converting the image.
     60            $this->get_output_format( $destfilename, $mime_type );
    5961            return self::$save_return;
    6062        }
Note: See TracChangeset for help on using the changeset viewer.