[wp-trac] [WordPress Trac] #63294: Got this error when send image via REST API on WP 6.8

WordPress Trac noreply at wordpress.org
Thu Apr 17 13:56:36 UTC 2025


#63294: Got this error when send image via REST API on WP 6.8
-------------------------------+------------------------------
 Reporter:  Astraport          |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  REST API           |     Version:  6.8
 Severity:  critical           |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by QuietNoise):

 Replying to [comment:3 oglekler]:
 > Hi @Astraport if your images have MIME types that are not aligned with
 the image format or are outside the limits, they will not be accepted.
 This is normal behaviour and should be expected, you don't want some virus
 pretended to be an image and such things are happening.
 >
 > To see what types are allowed, you can check wp_get_mime_types()
 function.
 >
 > Please clarify what MIME types and formats you have and where they come
 from to move forward — how it has happened in the first place, usually
 people don't have such issues at all. Possibly you need to check with the
 image source.

 I believe there is more to that. The same image uploaded through the Media
 library gets through without problems but uploading that image through
 Upload function will fail with the error mentioned by the OP.
 Similarly drag and dropping image into media upload box in Editor will
 fail with same error.
 Attached image above for reference what I'm talking about.

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


More information about the wp-trac mailing list