[wp-trac] [WordPress Trac] #54738: Unable to upload images with URL over API when the image doesn’t have a filetype in the filename

WordPress Trac noreply at wordpress.org
Mon Mar 3 00:17:29 UTC 2025


#54738: Unable to upload images with URL over API when the image doesn’t have a
filetype in the filename
---------------------------------------------+------------------------
 Reporter:  masteradhoc                      |       Owner:  joedolson
     Type:  enhancement                      |      Status:  closed
 Priority:  normal                           |   Milestone:  6.8
Component:  Media                            |     Version:
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:  rest-api
---------------------------------------------+------------------------
Changes (by joedolson):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"59902" 59902]:
 {{{
 #!CommitTicketReference repository="" revision="59902"
 Media: Allow uploading images from URLs without extensions.

 Enable `download_url()` to fetch and verify file types if the URL does not
 contain a file extension. This allows URL downloads to handle media
 endpoints like istockphoto.com that use file IDs and formatting arguments
 to deliver images.

 Props masteradhoc, mitogh, joedolson, hellofromTonya, antpb, audrasjb,
 navi161, dmsnell.
 Fixes #54738.
 }}}

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


More information about the wp-trac mailing list