
MediaFlock scans your WordPress posts for externally hosted media files and imports them directly into your WordPress media library. After import, it automatically replaces the old external URLs in your post content with the new local URLs, ensuring all your media is served from your own site.
The plugin uses five complementary URL extraction strategies to find external files in your content:
<a href> links pointing to external files.<img>, <video>, <audio>, and <source> elements.srcset attributes on <img> and <source> tags.background-image: url(...) declarations in inline styles and <style> blocks.After importing a file, the plugin replaces the external URL in your post content. It handles multiple URL encoding variants to ensure no references are missed:
& instead of &)%20 for spaces)//example.com/...)