Changeset 59413
- Timestamp:
- 11/18/2024 06:03:22 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-image-editor-gd.php
r59406 r59413 104 104 } 105 105 106 // WebP may not work with imagecreatefromstring().106 // Handle WebP and AVIF mime types explicitly, falling back to imagecreatefromstring. 107 107 if ( 108 function_exists( 'imagecreatefromwebp' ) && 109 ( 'image/webp' === wp_get_image_mime( $this->file ) ) 108 function_exists( 'imagecreatefromwebp' ) && ( 'image/webp' === wp_get_image_mime( $this->file ) ) 110 109 ) { 111 110 $this->image = @imagecreatefromwebp( $this->file ); 112 } else { 113 $this->image = @imagecreatefromstring( $file_contents ); 114 } 115 116 // AVIF may not work with imagecreatefromstring(). 117 if ( 118 function_exists( 'imagecreatefromavif' ) && 119 ( 'image/avif' === wp_get_image_mime( $this->file ) ) 111 } elseif ( 112 function_exists( 'imagecreatefromavif' ) && ( 'image/avif' === wp_get_image_mime( $this->file ) ) 120 113 ) { 121 114 $this->image = @imagecreatefromavif( $this->file );
Note: See TracChangeset
for help on using the changeset viewer.