
內容簡介
Safe SVG 可以讓你安心地在 WordPress 中上傳 SVG 檔案!
它能夠讓你允許上傳 SVG 檔案的同時,確保它們已經經過消毒以防止 SVG/XML 弱點影響你的網站。此外,它還能讓你在媒體庫的所有檢視中預覽已上傳的 SVG 檔案。
目前功能
消毒過的 SVG 檔案 - 不要讓未消毒的檔案打開你 WordPress 網站上的安全漏洞。
在媒體庫中查看 SVG - 猜測哪個 SVG 才是正確的已成為過去,我們將啟用 WordPress 媒體庫中的 SVG 預覽。
未來規劃的功能
運行 SVGO 最佳化 - 您可以選擇在上傳時將 SVG 檔案通過我們的 SVGO 伺服器來節省空間。
選擇誰可以上傳 - 將 SVG 上傳限制在 WordPress 網站上的某些用戶或允許所有人上傳。
最初是為了證明概念而存在,即#24251。
SVG 消毒是通過以下函式庫完成:https://github.com/darylldoyle/svg-sanitizer。
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
Safe SVG is the best way to Allow SVG Uploads in WordPress!
It gives you the ability to allow SVG uploads whilst making sure that they’re sanitized to stop SVG/XML vulnerabilities affecting your site. It also gives you the ability to preview your uploaded SVGs in the media library in all views.
Current Features
Sanitised SVGs – Don’t open up security holes in your WordPress site by allowing uploads of unsanitised files.
SVGO Optimisation – Runs your SVGs through the SVGO tool on upload to save you space. This feature is disabled by default but can be enabled by adding the following code: add_filter( 'safe_svg_optimizer_enabled', '__return_true' );
View SVGs in the Media Library – Gone are the days of guessing which SVG is the correct one, we’ll enable SVG previews in the WordPress media library.
Choose Who Can Upload – Restrict SVG uploads to certain users on your WordPress site or allow anyone to upload.
Initially a proof of concept for #24251.
SVG Sanitization is done through the following library: https://github.com/darylldoyle/svg-sanitizer.
SVG Optimization is done through the following library: https://github.com/svg/svgo.
