@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix content: <http://purl.org/rss/1.0/modules/content/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<https://lhero.org/?p=605>
  a sioc:Post ;
  dc:title "LH Add Media from URL" ;
  dcterms:identifier 605 ;
  dc:modified "2026-09-12T11:57:17Z"^^xsd:dateTime ;
  dc:created "2016-06-25T01:46:59Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-add-media-from-url/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded "<p class=\"wp-block-paragraph\">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.</p><h2 class=\"wp-block-heading\">Features</h2><ul class=\"wp-block-list\"><li>Fetches a remote URL and sideloads it into the media library via WordPress core&#8217;s own upload pipeline (<code>media_handle_sideload()</code>), so it goes through the same validation, thumbnail generation, and metadata handling as a normal upload.</li><li>Redirects to the new attachment&#8217;s edit screen on success.</li><li>Ships a bookmarklet: install it once, then click it on any page to upload the current URL without leaving the page.</li><li>Exposes an MCP ability (<code>lh-add-media-from-url/add-media-from-url</code>) 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.</li><li>File-extension and MIME detection run against the already-downloaded local copy via <code>wp_check_filetype_and_ext()</code>, staying inside WordPress core&#8217;s own SSRF-protected fetch path rather than making a second, unprotected request to the remote URL.</li></ul><h2 class=\"wp-block-heading\">Installation</h2><ol class=\"wp-block-list\"><li>Upload the <code>lh-add-media-from-url</code> folder to <code>/wp-content/plugins/</code>.</li><li>Activate the plugin through the &#8216;Plugins&#8217; menu in WordPress.</li><li>Go to Media -&gt; Add from URL to add media via URL, or use the bookmarklet.</li></ol><h2 class=\"wp-block-heading\">Documentation</h2><ul class=\"lh_portfolio-doc-toc\"><li><a href=\"https://lhero.org/portfolio/lh-add-media-from-url/architecture/\">Architecture</a></li><li><a href=\"https://lhero.org/portfolio/lh-add-media-from-url/changelog/\">Changelog</a></li></ul>"^^rdf:XMLLiteral ;
  sioc:content "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.FeaturesFetches a remote URL and sideloads it into the media library via WordPress core&#8217;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&#8217;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&#8217;s own SSRF-protected fetch path rather than making a second, unprotected request to the remote URL.InstallationUpload the lh-add-media-from-url folder to /wp-content/plugins/.Activate the plugin through the &#8216;Plugins&#8217; menu in WordPress.Go to Media -&gt; Add from URL to add media via URL, or use the bookmarklet.DocumentationArchitectureChangelog" ;
  sioc:topic <https://lhero.org/lh_portfolio-type/plugin/>, <https://lhero.org/?taxonomy=author&term=cap-1> .

<https://lhero.org/author/1/#account> rdfs:seeAlso <https://lhero.org/author/1/?feed=lhrdf&format=turtle> .
<https://lhero.org/lh_portfolio-type/plugin/> rdfs:seeAlso <https://lhero.org/lh_portfolio-type/plugin/?feed=lhrdf&format=turtle> .
<https://lhero.org/?taxonomy=author&term=cap-1> rdfs:seeAlso <https://lhero.org/?taxonomy=author&term=cap-1&feed=lhrdf&format=turtle> .
