Make WordPress Core

Opened 7 years ago

Last modified 5 years ago

#39021 new enhancement

Import Export Attachments

Reported by: lewiscowles's profile LewisCowles Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.6.1
Component: Export Keywords:
Focuses: administration Cc:


Currently when we export a post type, it seems that the post thumbnails are exported as id's. It would be fantastic if these could be exported as url's to the images as otherwise there is no way for a separate install to import the post data.

currently, for posts with a thumbnail the below or similar is added to the <item>


I propose this is moved to <wp:attachment> or <wp:post_thumbnail> and the specific postmeta for _thumbnail_id removed from postmeta and re-created on each import.

Problems with my suggestion that I've considered

  • Re-importing (w|c)ould create duplicate media. As the post has to exist for post-meta to be added. Maybe using the basename function we could check for existing media, maybe it's an edge case... I think this is unlikely to be a large problem and it potentially empowers less technical users.
  • Some plugins would see no benefit as they use either custom metadata keys or multiple attached images (like WooCommerce). I'd suggest this could be mitigated by adding a filter of an array of strings that on import / export treats a list of fields as keys to treat as thumbnails)

Change History (1)

#1 @desrosj
5 years ago

  • Component changed from General to Export
Note: See TracTickets for help on using tickets.