Changeset 50819
- Timestamp:
- 05/06/2021 11:09:34 AM (3 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-image-editor-imagick.php
r50810 r50819 204 204 break; 205 205 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 ) { 207 210 $this->image->setImageCompressionQuality( $quality ); 208 211 } else { -
trunk/src/wp-includes/media.php
r50818 r50819 5116 5116 return compact( 'width', 'height', 'type' ); 5117 5117 } 5118 5119 /**5120 * Determines if a passed image is a lossy WebP image.5121 *5122 * @since 5.8.05123 *5124 * @param string $filename The file path.5125 * @return bool Whether the file is a lossy WebP file.5126 */5127 function _wp_webp_is_lossy( $filename ) {5128 $webp_info = wp_get_webp_info( $filename );5129 $type = $webp_info['type'];5130 5131 return $type && 'lossy' === $type;5132 }
Note: See TracChangeset
for help on using the changeset viewer.