WordPress.org

Make WordPress Core

Opened 8 weeks ago

Last modified 2 weeks ago

#48164 new enhancement

media_sideload_image should store original URL and optionally check for dupes

Reported by: dshanske Owned by:
Milestone: 5.4 Priority: low
Severity: trivial Version:
Component: Media Keywords: has-patch
Focuses: Cc:
PR Number:

Description

When sideloading a file from a URL, using media_sideload_image, the original URL should be stored as metadata automatically.

The reason for this to be done in Core, as opposed to a plugin, is that the reason why individuals use media_sideload_image is to store a local copy of a file. It should, for copyright and fairness reasons, store where it was originally hosted.

The secondary advantage is the sideload can query existing attachments and not sideload the same file twice.

Attachments (1)

48164.diff (870 bytes) - added by dshanske 2 weeks ago.

Download all attachments as: .zip

Change History (2)

@dshanske
2 weeks ago

#1 @dshanske
2 weeks ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 5.4
  • Priority changed from normal to low
  • Severity changed from normal to trivial

This patch needs no unit testing I can think of. It is merely storing information so that we can be sure to attribute images that are passed in by URL. The only question is whether the meta key name is the best one for this.

Note: See TracTickets for help on using tickets.