wp-cli/wp-cli — pull request #751 by danielbachhuber (2013-09-09 18:48:54+00:00)
Title: `wp media sideload`: A command for sideloading images embedded in posts

Use this command to import image assets (and possibly other media) into WordPress. The command:

* Loops through all posts to find embedded images in post_content.
* If the image doesn't exist in WordPress, downloads the image and imports as an attachment.
* Replaces the image reference in post_content with the URL of the newly imported attachment.