4 | | * As a separate problem, [59317] does not check which MIME type to convert an image to. The `image_editor_output_format` can be used with an output array for each MIME type, and the Modern Image Formats plugin may specify the MIME type itself there too. For example, "for JPEG" input, the valid output format is "JPEG" and/or "WebP". If you think about it as a conversion map, this may seem weird, but the filter is about "output format", not "conversion map", so we cannot assume it's only used as the latter. Core may therefore currently try to convert a JPEG to a JPEG, which it shouldn't even attempt. We should only set the `$convert` flag to `true` if the output format only contains MIME types that differ from the input MIME type. |
| 4 | * As a separate more minor problem, [59317] does not check which MIME type to convert an image to. The `image_editor_output_format` can receive the same output as input MIME type. The Modern Image Formats plugin for example specifies it dynamically, depending on the configuration. It's definitely possible for the filter to include a map entry from `image/jpeg` to `image/jpeg` for example. If you think about it as a conversion map, this may seem weird, but the filter is about "output format", not "conversion map", so we cannot assume it's only used as the latter. Core may therefore currently try to convert a JPEG to a JPEG, which it shouldn't even attempt. We should only set the `$convert` flag to `true` if the output format only contains MIME types that differ from the input MIME type. |