WordPress.org

Make WordPress Core

Ticket #53667: 53667.diff

File 53667.diff, 1.2 KB (added by desrosj, 2 months ago)
  • src/wp-includes/class-wp-image-editor.php

     
    322322                 * Enables filtering the mime type used to save images. By default,
    323323                 * the mapping array is empty, so the mime type matches the source image.
    324324                 *
     325                 * This should be considered experimental as there are a few edge cases that
     326                 * still need to be solved.
     327                 *
     328                 * When this filter is used in combination with the {@see 'wp_editor_set_quality'}
     329                 * filter, the image quality value used will be that of the original mime type,
     330                 * not the mapped one. This could result in unexpected image quality for generated
     331                 * images. See https://core.trac.wordpress.org/ticket/53667 for more details.
     332                 *
     333                 * When a mime type is mapped to another, and two images with the same name are
     334                 * uploaded (image.jpg and image.webp, for example), the generated images for one
     335                 * will potentially overwrite the other's.
     336                 * See https://core.trac.wordpress.org/ticket/53668 for more details.
     337                 *
    325338                 * @see WP_Image_Editor::get_output_format()
    326339                 *
    327340                 * @since 5.8.0