External files in Media Library

外掛說明

請前往 [媒體]→[新增媒體檔案] 新增一或多個檔案的網址,使用者便能使用這種方式將這些外部檔案新增至媒體庫如同媒體庫中的其他檔案一樣,並可用於全站任何位置。

嵌入 YouTube、Vimeo、FTP、伺服器本機路徑或其他可用來源的檔案,並能在偏好使用的編輯器中使用這類檔案。這個外掛支援區塊編輯器、Elementor、Divi、傳統編輯器、WPBakery 等多種編輯器。

在 WooCommerce 商店中使用商品圖片的外部資料來源。

批次匯入

使用者可以頭過支援的 TCP 通訊協定匯入完整目錄,僅需將目錄輸入為匯入路徑,這個外掛便會匯入支援的檔案。

TCP 通訊協定

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

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

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

定期檢查

這個外掛會自動定期檢查網站上所儲存的外部代管且網站已使用的檔案是否仍然可供使用。

存放庫及線上說明

請前往這裡閱讀線上說明。

開發用存放庫代管於 GitHub

螢幕擷圖

  • 用於新增外部檔案的欄位 (位於 [媒體]→[新增媒體檔案])
  • 新增外部檔案網址的對話方塊

安裝方式

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

常見問題集

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

是。網站管理員可以在 [設定]→[External files in Media Library] 中設定哪些使用者角色可以新增外部網址檔案。

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

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

是否能嵌入 FTP 的檔案?

是,請參考這份線上說明

是否能匯入完整的目錄?

是,僅需輸入要匯入的目錄路徑。

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

是,僅需輸入 file 通訊協定的絕對路徑 (例如 file:///var/www/path/to/file.png),另請參閱這份線上說明

是否能匯入 WooCOmmerce 的外部商品圖片?

是,僅需前往 [設定]→[External files in Media Library]→[WooCommerce] 啟用相關設定。WooCommerce 已經實作這項功能,因此僅需在要匯入的 CSV 檔案中新增圖片的外部網址即可,這個外掛自會將這些檔案處理為外部檔案。這也代表網站管理員可以使用這個外掛支援的通訊協定匯入這些檔案。

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

有。請參閱這份線上說明,便能了解關於 WP CLI 的選項。

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

依據 Google 的規範,用於連接至 Google Drive API 的應用程式,只有超過 100 個活躍使用者才會進行檢查及驗證。只要透過這個外掛使用這個功能的使用者仍低於 100 個,就始終會顯示這個訊息。請點擊「不安全」進行確認,仍可將 WordPress 網站連接至 Google 雲端硬碟。

使用者評論

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 訂閱開發記錄

變更記錄

3.1.0

  • Added support for image meta-data (like caption) for external hosted images
  • Added more hooks
  • Added Third Party support for Block Editor and Elementor
  • Added link to support forum on our plugin in plugin list
  • Added link to support forum in add URLs dialog
  • Optimized the settings objects for future independence from this plugin
  • Usage of external embedded YouTube URLs in Block Editor is now possible
  • Choose your YouTube videos from local media library in Elementors Video widget
  • Remove some unused codes
  • Fixed refreshing of permalinks (which as been run on every request until now)
  • Fixed potential error on WP CLI function to add Google Drive connection
  • Fixed missing support for plugin PreventDirectAccess
  • Fixed some typos

older changes