Make WordPress Core


Ignore:
Timestamp:
05/06/2021 11:09:34 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Media: Remove _wp_webp_is_lossy() for now.

The function was only used in a single place in core.

Follow-up to [50810], [50814], [50815], [50818].

Props johnjamesjacoby.
See #35725.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-image-editor-imagick.php

    r50810 r50819  
    204204                                        break;
    205205                                case 'image/webp':
    206                                         if ( _wp_webp_is_lossy( $this->file ) ) {
     206                                        $webp_info = wp_get_webp_info( $this->file );
     207                                        $type      = $webp_info['type'];
     208
     209                                        if ( $type && 'lossy' === $type ) {
    207210                                                $this->image->setImageCompressionQuality( $quality );
    208211                                        } else {
Note: See TracChangeset for help on using the changeset viewer.