Changeset 59423
- Timestamp:
- 11/19/2024 08:21:31 PM (4 months ago)
- Location:
- branches/6.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.7
-
branches/6.7/src/wp-includes/class-wp-image-editor-gd.php
r59145 r59423 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.