[wp-trac] [WordPress Trac] #62447: WP 6.7 Block Editor converting new PNG uploads to JPEG with mangled backgrounds

WordPress Trac noreply at wordpress.org
Sat Nov 16 16:38:09 UTC 2024


#62447: WP 6.7 Block Editor converting new PNG uploads to JPEG with mangled
backgrounds
-------------------------------+------------------------------
 Reporter:  room34             |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Editor             |     Version:  6.7
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by room34):

 I just found this:

 [Safari 17+: Image file got automatically converted to HEIC
 extension](https://forums.developer.apple.com/forums/thread/743049)

 Seems Safari is doing it when `image/heic` is included in the `accept`
 attribute of the file input. The `accept` attribute is present in the
 Image block uploader but not in the Media Library uploader.

 I don't know exactly how the drag-and-drop process works (I'm decent with
 vanilla JavaScript, clumsy with AJAX, and know nothing about React at
 all), but that also is obviously not a scenario where there's a file input
 with an `accept` attribute, hence the image is not being mishandled.

 So… yes, it's a Safari bug. But it's happening because the `accept`
 attribute was added to the file input in the Image block.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62447#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list