External files in Media Library

外掛說明

Add one or more files with their URLs under Media > “Add New Media File”. You can use these external files anywhere the media library is used.

Feature

Embed your files from AWS S3, DropBox, Google Drive, Google Cloud Storage, FTP, your local hosting, another website in your multisite, other WordPress REST APIs, YouTube or many other possible sources. Use them in your preferred editor such as Block Editor, Elementor, Divi, Classic Editor, WpBakery and many more as if the files were stored normally in your media library.

Automatically synchronize external directories containing files with your media library at intervals you specify.

And even more:

✅ Add the files with their external dates. This allows you to get the date, helpful for SEO, for example.
✅ Import them as real files instead of just linking to them in your media library. This allows you to import any amount files into your project.
✅ Check their availability (only for HTTP connections) to ensure that the external files are actually available.
✅ Configure, which users in your project are allowed to use the external files options.
✅ Extract ZIP files from any external source into your media library.

支援的其他外掛

Use external URLs when importing products via CSV in a WooCommerce store (including access data for these e.g., via an FTP).

Add external files on download lists of Download Lists with Icons.

Sort your external files in a folder of CatFolders, Filebird, Folderly, Folders, iFolders, Media Library Organizer or assign them into categories from Enhanced Media Library and Real Media Library Lite. Also supported: NextGen Gallery and Robo Gallery. You can import and synchronize them in these plugins.

And compatible with Network Media Library for use in multisites.

And it is also compatible with multilingual plugins like Polylang to translate the media files.

The plugin is also compatible with a variety of other plugins not listed here. If, contrary to expectations, something does not work properly, please report it in the support forum.

REST API

You can manage your external files with REST API requests as documented here.

批次匯入

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 or use the external source tools to navigate to the directory to import.

For large directories, there is also an automatically processed queue. You could also use the WP CLI for large directories.

TCP 通訊協定

網站管理員可以使用下列 TCP 通訊協定將外部檔案匯入至媒體庫:

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

以上某些通訊協定需要憑證,而憑證對 HTTP(S) 通訊協定為選用項目。

Service plugins

Support for additional platforms as external sources is enabled by additional service plugins. These are now:

➕ External files from AWS S3 in Media Library (incl. support for AWS S3, Backplaze S3, Cloudflare R2 and DigitalOcean Spaces)
➕ External files from Google Cloud Storage in Media Library
➕ External files from Google Drive in Media Library
➕ External files from WebDav in Media Library (incl. any WebDav-provider like NextCloud or Seafile)

They can be installed manually or in the backend of your WordPress under Media Library > Add External Files.

Use cases

Here are a few examples of how this plugin can help you:

💡 Store particularly large files in a different storage location so that you save storage space on your hosting.
💡 Import files that your graphic designer provides you in a shared directory.
💡 Automatically synchronize photos from your vacation for display on your website.
💡 Use regularly newly generated PDF files from a shared directory for output on your website.
💡 Get images for your products from a central directory.

Find more here

ClassicPress

This plugin is compatible with ClassicPress.

存放庫、線上說明及可靠性

You find some documentations on this plugin page and in GitHub.

開發用存放庫代管於 GitHub。

這個外掛僅會在符合以下條件時,才會發佈新版本:

✅ PHPStan check for possible bugs.
✅ Compliance with WordPress Coding Standards.
✅ No failures during PHP Compatibility check.
✅ No exceptions during PHP Unit Tests.

螢幕擷圖

安裝方式

  1. 將壓縮檔解壓縮所得的 external-files-in-media-library 資料夾上傳至 /wp-content/plugins/ 目錄中。
  2. 在 WordPress 管理後台的 [外掛] 選單中啟用外掛。

常見問題集

Why do you need to install additional plugins for some sources?

Two reasons for this:

a) Some of the external sources use libraries whose licenses are not permitted in the WordPress repository. For example, the aws/aws-sdk-php library for AWS uses the Apache License. This is not compatible with GPL.

b) With all these libraries, the plugin would be too large to publish in the WordPress repository.

是否可以不讓其他 WordPress 使用者新增外部網址檔案?

Yes, you can select under Settings > “External files in Media Library” > Permissions, which roles gets the ability to add or delete external URLs in your media library.

是否可以嵌入受密碼保護的外部檔案?

是,但這類檔案會整合在伺服器本機,而非透過原始的外部網址,這樣網站訪客才能無縫存取這些檔案。

Can I embed files from an FTP?

Yes, you can add them manually or with the FTP-tool in Media > “Add external files”.

是否能匯入完整的目錄?

Yes, you can. Just enter the directory to import or use the tools under Media > “Add external files”. All files in the directory will be imported.

Do the upload size limits for files apply in the same way as for a normally uploaded file?

No, there is no fixed size limit for external files. Limits are determined by the storage space available to you, depending on where the file is stored.

是否能從伺服器本機匯入檔案?

Yes, you can. Simply use the Local tool under Media > “Add external files” or enter the absolute path with file-protocol,
e.g., file:///var/www/path/to/file.png – see also our documentation.

是否能匯入 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 as external source of your files.

這個外掛是否有 WP CLI 命令?

Yes, we provide many options on WP CLI, see our documentation.

在連接至 Google 雲端硬碟時,Google 顯示訊息告知 App 尚未經過驗證,是什麼原因?

According to Google guidelines, an app that is used to connect to the Google Drive API is only checked and confirmed once
it has 100 active users. As long as less than 100 active users use this function via this plugin, you will always see
this message. You can confirm it via “unsecure” and still complete the connection of your Google Drive with your
WordPress website.

使用者評論

2024 年 10 月 2 日 5 則留言
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
2024 年 8 月 1 日 1 則留言
Highly recommend this plugin for anyone looking to enhance their media management with ease!
2024 年 4 月 12 日
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 !
閱讀全部 3 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈External files in Media Library〉的開發相關工作。

參與者

〈External files in Media Library〉外掛目前已有 4 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈External files in Media Library〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄。

變更記錄

5.5.0

  • Added mp3 as additional allowed external file
  • Added search field in directory listing for search for file names in the complete directory tree
    of the external source
  • Added list of file sizes per service in statistics
  • Added abilities for AI/MCP to list and check external files, to import multiple URLs, to manage external sources,
    the synchronization, the queue and the export, see documentation
  • Added settings for the abilities: enable or disable them and choose between “read only” (default) and “all”
  • Added status of the abilities and hint for the needed MCP plugin in the settings
  • Added some new hooks & PHP Unit tests
  • Advanced settings are divided into the sub-tabs “Plugin”, “Files”, “Abilities” and “Miscellaneous”
  • The intro has its own section in the advanced settings in the sub-tab “Plugin”
  • The intro now uses Driver.js instead of Intro.js
  • Links to the settings in the import dialog are now leading to the general settings
  • Proxies does use the already present mime-type instead of getting it again and again
  • Logging what we get via HTTP
  • Proxy settings for each file type is only visible if the files are saved external
  • Optimized the abilities for interactions with AI/MCP
  • Abilities return an error with the reason instead of 0 or false if they fail
  • The ability to delete a URL also accepts the attachment ID and checks if the user is allowed to delete the file
  • Optimized some texts
  • Format bytes in statistics
  • Hide generic directories (e.g., “vendor” and “node_modules”) in local service
  • Log entries and import results are reduced to a small set of allowed HTML elements
  • Requests to the proxy for unknown files are only logged in debug mode
  • External sources saved by other users can only be used by administrators (or if the setting to show all sources is enabled)
  • Export settings, and the bulk export require the capability to use the export tool
  • Changing the global DropBox connection requires the capability to manage the settings
  • DropBox OAuth requests are now protected by a state parameter
  • Multisite service checks whether the user is allowed to access the requested website
  • Our post meta fields on attachments are now protected against manual changes
  • Local files used as export target or temp file must be located in the allowed base directory
  • Credentials are no longer written to the debug log and only exported by administrators
  • Updated dependencies
  • Fixed the events after loading the import dialog and after the import: the intro stopped after opening the import dialog and the sound after the import was not played
  • Fixed fatal error if the ability to add a URL is used without attachment ID or with a login only
  • Fixed wrong name of the ability category
  • Fixed real import and usage of external file dates during import, which only worked if they were enabled for the
    synchronization (the real import created broken files in the media library otherwise)
  • Fixed detection of URLs of files in ZIP-files by the ZIP protocol
  • Fixed sum of file sizes per service in statistics, which only showed the size of a single file
  • Fixed possible XSS via HTTP header of external files in the import result dialog
  • Fixed missing output escaping of URLs in the log table and media modal
  • Fixed fatal error in the frontend with WordPress older than 6.8 using the page builder Brizy
  • Fixed fatal error for shortcodes without attributes with WordPress older than 6.5
  • Fixed only first YouTube or Vimeo video per page being rendered
  • Fixed plugin installation from a ZIP not stopping on failed checks
  • Fixed deletion of synchronized files if the external source could not be read
  • Fixed queue being blocked by URLs without credentials
  • Fixed deletion of files on export targets for files, which were never exported
  • Fixed export not being paused during switch to local hosting
  • Fixed already exported files being exported again via bulk action
  • Fixed type errors on core image filters if other plugins return unexpected values
  • Fixed type errors with Brizy and Folders
  • Fixed proxy not finding files with a hyphen and an “x” in their name
  • Fixed thumbnails of squared sizes being re-generated on every request
  • Fixed statistics being calculated on every request if no external hosted files exist
  • Fixed the interval “every 20 minutes” running every 15 minutes
  • Fixed wrong version parameter on enqueued files
  • Fixed missing sync settings if Download List Block is active without any list
  • Fixed search in the log for URLs with special characters
  • Fixed to show the debug information in site health

older changes