Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#38938 closed enhancement (duplicate)

WP API does not expose the ID of sideloaded media.

Reported by: dotancohen Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Media Keywords:
Focuses: Cc:


Retrieving the ID of sideloaded media requires horrible workarounds:


I will attach a patch to this issue which makes life easier for WP Theme and Plugin developers who need this feature.

Attachments (1)

wordpress_38938.diff (1.5 KB) - added by dotancohen 5 years ago.
Patch to optionally return the ID of a sideloaded media file.

Download all attachments as: .zip

Change History (2)

5 years ago

Patch to optionally return the ID of a sideloaded media file.

#1 @swissspidy
5 years ago

  • Component changed from Upload to Media
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version trunk deleted

Hey there,

Thanks for opening a ticket! We're already tracking this enhancement in #19629. Would you mind checking out the current patch and share yours there?

Note: See TracTickets for help on using tickets.