[wp-trac] [WordPress Trac] #63302: SVG images can't be uploaded anymore due to a resizing issue
WordPress Trac
noreply at wordpress.org
Fri Apr 18 17:43:44 UTC 2025
#63302: SVG images can't be uploaded anymore due to a resizing issue
-----------------------------------------+---------------------
Reporter: audrasjb | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.8.1
Component: Editor | Version: 6.8
Severity: normal | Resolution:
Keywords: has-screenshots needs-patch | Focuses:
-----------------------------------------+---------------------
Comment (by SirLouen):
Replying to [comment:16 pbiron]:
> thoughts?
I'm trying to think of supported image types, and afaik, only svg can't
support resizing and are the only ones not being converted, so, since this
is an edge case, that could simply be handled by hard-coding it directly
in the function you propose (instead of having to add another filter,
because ultimately its going to become a 2-filter-sequence to support SVG
after this, which is not ideal from my pov.
{{{#!php
<?php
function wp_image_editor_needs_to_support( $args = array() ) {
if ( isset( $args['mime_type'] ) && 'image/svg+xml' ===
$args['mime_type'] ) {
return false;
}
return true;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63302#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list