前言介紹
- 這款 WordPress 外掛「ImageBase642File」是 2021-06-07 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2022-08-03,距離現在已有 1006 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 5.1 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.1 以上。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
donjajo |
外掛標籤
image | save_post | convert image |
內容簡介
這個外掛能夠將 base64 編碼的內嵌圖片轉換為絕對網址,並上傳至 WordPress 目錄。當文章儲存時就會進行轉換。
以下是轉換前和轉換後的範例:
轉換前:
轉換後:
如果要在 WordPress 外使用編輯器,這款編輯器將以 base64 編碼格式嵌入圖片,這會使文章內容過長,也無法存入緩衝區,除非將 PHP 設置為非常高的記憶體使用率。
這個外掛能夠將編碼後的 base64 內嵌圖片轉換為連結,透過刪除 base64、解碼、儲存檔案,然後替換為 URL 的方式,使得文章內容變得非常簡短。此外,為了避免複製 base64 編碼到檔案時超出 PHP 記憶體限制,這個外掛會對每段 76 字元(76 byte)的 base64 編碼進行複製,保證不會因為複製圖片而過度佔用 PHP 記憶體。而且,此外掛速度比使用正則表達式還要快。
原文外掛簡介
This plugin converts base64 encoded inline images to an absolute URL by; uploading inline image into WordPress directory. This happens when a post is saved.
It converts this:
To this:
I was working on an external editor to allow users to post on WordPress, this editor embeds images in base64 encoded format. This makes post contents too long to load on-page and also cannot be stored on buffer unless PHP is set to very high memory usage.
This plugin converts the encoded base64 inline images to a link by scrapping out the base64, decode, store to file and replace with the URL. The post content becomes very short. This is over-engineered to prevent PHP memory limit when trying to copy base64 encode to file. This plugin will perform each chunk copy on 76 characters, 76 bytes. This is the base64 line limit. There will never be an out of memory when copying these images.
And, it is faster than using regex
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「ImageBase642File」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0.0 |
延伸相關外掛(你可能也想知道)
暫無相關外掛推薦。