Changeset 59317 for trunk/src/wp-includes/media.php
- Timestamp:
- 10/29/2024 05:59:10 AM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r59315 r59317 6234 6234 */ 6235 6235 function wp_get_image_editor_output_format( $filename, $mime_type ) { 6236 $default_output_format = array( 6237 'image/heic' => 'image/jpeg', 6238 'image/heif' => 'image/jpeg', 6239 'image/heic-sequence' => 'image/jpeg', 6240 'image/heif-sequence' => 'image/jpeg', 6241 ); 6242 6236 6243 /** 6237 6244 * Filters the image editor output format mapping. 6238 6245 * 6239 * Enables filtering the mime type used to save images. By default ,6240 * the mapping array is empty, so the mime type matches the source image.6246 * Enables filtering the mime type used to save images. By default HEIC/HEIF images 6247 * are converted to JPEGs. 6241 6248 * 6242 6249 * @see WP_Image_Editor::get_output_format() 6243 6250 * 6244 6251 * @since 5.8.0 6245 * @since 6.7.0 The default was changed from array() to array( 'image/heic' => 'image/jpeg' ).6252 * @since 6.7.0 The default was changed from empty array to array containing the HEIC mime types. 6246 6253 * 6247 6254 * @param string[] $output_format { … … 6254 6261 * @param string $mime_type The source image mime type. 6255 6262 */ 6256 return apply_filters( 'image_editor_output_format', array( 'image/heic' => 'image/jpeg' ), $filename, $mime_type );6257 } 6263 return apply_filters( 'image_editor_output_format', $default_output_format, $filename, $mime_type ); 6264 }
Note: See TracChangeset
for help on using the changeset viewer.