mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Media: Only mark an image as requiring conversion if the output format differs from the input format.
Follow up to [59317] and [59346]. Props adamsilverstein, peterwilsoncc. See #62305. Built from https://develop.svn.wordpress.org/trunk@59366 git-svn-id: http://core.svn.wordpress.org/trunk@58752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ba9fe05e26
commit
9da71e3d7a
@ -301,7 +301,11 @@ function wp_create_image_subsizes( $file, $attachment_id ) {
|
||||
// The image may need to be converted regardless of its dimensions.
|
||||
$output_format = wp_get_image_editor_output_format( $file, $imagesize['mime'] );
|
||||
|
||||
if ( is_array( $output_format ) && array_key_exists( $imagesize['mime'], $output_format ) ) {
|
||||
if (
|
||||
is_array( $output_format ) &&
|
||||
array_key_exists( $imagesize['mime'], $output_format ) &&
|
||||
$output_format[ $imagesize['mime'] ] !== $imagesize['mime']
|
||||
) {
|
||||
$convert = true;
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.8-alpha-59364';
|
||||
$wp_version = '6.8-alpha-59366';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user