Digital Sovereignty for everyone

LH Add Media from URL

LH Add Media from URL fetches a remote file by URL and adds it to the WordPress media library — via wp-admin or a JavaScript bookmarklet. Useful when you find an image or file elsewhere online and want a permanent local copy in your own media library, rather than depending on the original URL staying up.

Features

  • Fetches a remote URL and sideloads it into the media library via WordPress core’s own upload pipeline (media_handle_sideload()), so it goes through the same validation, thumbnail generation, and metadata handling as a normal upload.
  • Redirects to the new attachment’s edit screen on success.
  • Ships a bookmarklet: install it once, then click it on any page to upload the current URL without leaving the page.
  • Exposes an MCP ability (lh-add-media-from-url/add-media-from-url) so an MCP agent can pull a remote file into the media library the same way, without a human filling in the form — see Architecture for details.
  • File-extension and MIME detection run against the already-downloaded local copy via wp_check_filetype_and_ext(), staying inside WordPress core’s own SSRF-protected fetch path rather than making a second, unprotected request to the remote URL.

Installation

  1. Upload the lh-add-media-from-url folder to /wp-content/plugins/.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Go to Media -> Add from URL to add media via URL, or use the bookmarklet.

Documentation

If you like this plugin please consider making a donation to further development

Install LHero.org

lhero.org

Open it straight from your home screen, full screen and quicker to load.

  1. Tap the Share button . If you cannot see it, tap ••• first.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add.
  1. Tap the browser menu ⋮.
  2. Tap Install app or Add to Home screen.
  1. In the menu bar, choose File, then Add to Dock.

Use your browser's menu to install this site or add it to your home screen.