Changeset 60195 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
- Timestamp:
- 04/28/2025 03:37:27 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
r60084 r60195 156 156 str_starts_with( $files['file']['type'], 'image/' ) 157 157 ) { 158 // Check if the image editor supports the type. 159 if ( ! wp_image_editor_supports( array( 'mime_type' => $files['file']['type'] ) ) ) { 158 // List of non-resizable image formats. 159 $editor_non_resizable_formats = array( 160 'image/svg+xml', 161 ); 162 163 // Check if the image editor supports the type or ignore if it isn't a format resizable by an editor. 164 if ( 165 ! in_array( $files['file']['type'], $editor_non_resizable_formats, true ) && 166 ! wp_image_editor_supports( array( 'mime_type' => $files['file']['type'] ) ) 167 ) { 160 168 return new WP_Error( 161 169 'rest_upload_image_type_not_supported',
Note: See TracChangeset
for help on using the changeset viewer.