External files in media library

Description

Add one or more files under Media > “Add new media file”. You can use the files in all places where the media library is used.

Mass-Import

You can import complete directories from any of the supported TCP protocols. Just enter the directory as path to import and the plugin will import any supported files from it.

TCP Protocols

You can use the following TCP-protocols to import external files in your media library:

  • http://
  • https://
  • ftp://
  • ftps://
  • sftp://
  • ssh://
  • file://

Some of them require credentials, for http it is optional.

Checks

The plugin checks for you automatically on a regular basis whether the external files you have stored are still available.

Settings

In the settings you can define whether image files are hosted locally in your hosting or externally.

Repository and documentation

You find some documentations here.

The development repository is on GitHub.

Screenshots

  • Field to add external files in Media > Add New Media File.
  • Dialog to add URLs of external files.

Installation

  1. Upload “external-files-in-media-library” to the “/wp-content/plugins/” directory.
  2. Activate the plugin through the “Plugins” menu in WordPress.

FAQ

Can I prevent other WordPress-users from adding external files?

Yes, you can select under Settings > External files in Media Library which roles gets the ability to add external files.

Can I also embed password-protected external files?

Yes, but these files will included locally and not from the external URL.

Can I embed files from FTP?

Yes, see our documentation.

Can I import complete directories?

Yes, you can. Just enter the directory to import.

Can I import from my local server?

Yes, you can. Simply enter the absolute path with file-protocol, e.g.: file:///var/www/path/to/file.png – see also our documentation.

Can I import external product images for WooCommerce?

Yes, simply enable the setting under Settings > External files in Media Library > WooCommerce. Add your external URLs
for images in the CSV you want to import as it is already possible with WooCommerce. They will be handled as
external files by this plugin. This also allows you to use all protocols supported by the plugin for importing these files.

Is there a WP CLI command?

Yes, there are many options on WP CLI, see our documentation.

Reviews

སྤྱི་ཟླ་བཅུ་པ། 2, 2024 5 replies
Hi there,Wanted to give it a try but it took my site down![29-Sep-2024 09:00:07 UTC] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string & int in /home/xxxxxxxxxxxxx.com/public_html/wp-includes/class-wp-rewrite.php:1036Stack trace:#0 /home/xxxxxxxxxxxxx.com/public_html/wp-includes/class-wp-rewrite.php(1410): WP_Rewrite->generate_rewrite_rules()#1 /home/xxxxxxxxxxxxx.com/public_html/wp-includes/class-wp-rewrite.php(1509): WP_Rewrite->rewrite_rules()#2 /home/xxxxxxxxxxxxx.com/public_html/wp-includes/class-wp-rewrite.php(1884): WP_Rewrite->refresh_rewrite_rules()#3 /home/xxxxxxxxxxxxx.com/public_html/wp-includes/rewrite.php(282): WP_Rewrite->flush_rules()#4 /home/xxxxxxxxxxxxx.com/public_html/wp-content/plugins/external-files-in-media-library/classes/eml/Controller/class-proxy.php(225): flush_rewrite_rules()#5 [internal function]: threadi\eml\Controller\Proxy::do_refresh()#6 /home/xxxxxxxxxxxxx.com/public_html/wp-content/plugins/external-files-in-media-library/classes/eml/class-transient.php(186): call_user_func()#7 /home/xxxxxxxxxxxxx.com/public_html/wp-content/plugins/external-files-in-media-library/classes/eml/class-transients.php(152): threadi\eml\Transient->display()#8 /home/xxxxxxxxxxxxx.com/public_html/wp-content/plugins/external-files-in-media-library/inc/admin.php(1241): threadi\eml\Transients->check_transients()#9 /home/xxxxxxxxxxxxx.com/public_html/wp-includes/class-wp-hook.php(324): eml_admin_notices()#10 /home/xxxxxxxxxxxxx.com/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()#11 /home/xxxxxxxxxxxxx.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()#12 /home/xxxxxxxxxxxxx.com/public_html/wp-admin/admin-header.php(303): do_action()#13 /home/xxxxxxxxxxxxx.com/public_html/wp-admin/plugins.php(624): require_once(‘/home/1340234.c…’)#14 {main}thrown in /home/xxxxxxxxxxxxx.com/public_html/wp-includes/class-wp-rewrite.php on line 1036
སྤྱི་ཟླ་བརྒྱད་པ། 1, 2024 1 reply
Highly recommend this plugin for anyone looking to enhance their media management with ease!
སྤྱི་ཟླ་བཞི་པ། 12, 2024
This plugin simply does what it says it does.This allows me to have images hosted on a Discord channel directly on my Wordpress website without having to host a single one of them. If I could find just one little thing to add, it would be to see in real time which link is being processed. Bravo to the developer, great work !
Read all 3 reviews

Contributors & Developers

“External files in media library” is open source software. The following people have contributed to this plugin.

Contributors

“External files in media library” has been translated into 4 locales. Thank you to the translators for their contributions.

Translate “External files in media library” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.0.0

  • Initial release

1.0.1

  • Updated compatibility-flag for WordPress 6.4
  • Compatible with WordPress Coding Standards 3.0
  • Fixed error in settings-save-process
  • Fixed typo in translations

1.0.2

  • Added hook documentation
  • Added hint for hook documentation in settings
  • Optimized handling of upload-form if nothing has been added there
  • Removed language files from release

1.1.0

  • Added multiple hooks
  • Prevent usage of plugin with older PHP than required minimum
  • Optimized content type detection
  • Optimized attachment title handling with special chars
  • Updated compatibility-flag for WordPress 6.4.3
  • Updated dependencies

1.1.1

  • Proxy-slug will now also be changed with simple permalinks
  • Updated compatibility-flag for WordPress 6.5
  • Updated hook documentation
  • Fixed support for spaces in URLs
  • Fixed typo in examples in hook-documentation
  • Fixed possible notice in transient-handler
  • Fixed usage of proxy with simple permalinks

1.1.2

  • Fixed possible error during check for current screen
  • Fixed usage of URLs with ampersand on AJAX-request

1.2.0

  • New import dialog with progress and extended info about the import
  • Show proxy hint on file only if proxy is enabled
  • Optimized style for box with infos about external files
  • Updated compatibility-flag for WordPress 6.5.2
  • Updated dependencies

1.2.1

  • Added support for hook of plugin “Download List Block with Icons” for mark external files with rel-external
  • Updated compatibility-flag for WordPress 6.5.3
  • Updated dependencies

1.2.2

  • Updated compatibility-flag for WordPress 6.6
  • Updated dependencies
  • Fixed potential error on attachment pages

1.2.3

  • Updated dependencies

1.3.0

  • Added possibility to switch the hosting of images during local and extern on media edit page
  • Added new column for marker of external files in media table
  • Compatibility with plugin Prevent Direct Access: hide options for external fields
  • Fixed some typos
  • Fixed wrong proxied URL after successful import of images

2.0.0

  • Revamped plugin
  • Added queue for importing large amount of URLs
  • Added support for import of directories with multiple files
  • Added support for different tcp-protocols
  • Added support for FTP-URLs
  • Added support for SSH/SFTP-URLs
  • Added support for file-URL (to import from local server)
  • Added support for credentials for each tcp-protocol
  • Added wrapper to support third party plugins or platforms, e.g. Imgur or Google Drive
  • Added support for Rank Math
  • Added warning about old PHP-versions
  • Added option to switch external files to local hosting during uninstallation of the plugin
  • Added WP CLI option to switch hosting of all files to local or external
  • Added documentation for each possible option in GitHub
  • Added link to settings in plugin list
  • Added migration tool to switch the external files from Exmage to this one
  • Added thumbnail support for proxied images
  • Added settings for videos which now can also be proxied
  • Added import and export for plugin settings
  • Added a handful help texts for WordPress-own help system
  • Added multiple new hooks
  • Added statistic about used files.
  • Added warning regarding the GPRD of the EU (could be disabled)
  • Compatible with WordPress 6.7
  • External files which are not provided via SSL will be saved local if actual website is using SSL
  • Extended WP CLI support with documentation, progressbar, states and arguments
  • Replaced settings management with optimized objects
  • Optimized proxy url handling
  • Optimized build process for releases
  • Optimized transients of this plugin
  • Optimized log table with much more options
  • Replaced dialog library with new one
  • Renamed internal transient prefix for better compatibility with other plugins
  • Move support for already supported plugins in new wrapper
  • Fixed some typos
  • Fixed error with import of multiple files via WP CLI

2.0.1

  • Small optimizations on texts for better translations
  • GPRD-hint is now also shown for old installations if it is not disabled
  • Fixed update handler for WordPress 6.7
  • Fixed setting of capabilities for Playground
  • Fixed setting of capabilities on update