[WordPress] 外掛分享: WP SVG Images

首頁外掛目錄 › WP SVG Images
WordPress 外掛 WP SVG Images 的封面圖片
30,000+
安裝啟用
★★★★★
5/5 分(13 則評價)
26 天前
最後更新
100%
問題解決
WordPress 3.0.1+ PHP 5.6.40+ v4.5 上架:2016-08-25

內容簡介

WP SVG Images 外掛允許用戶安全地將 SVG 檔案上傳至媒體庫,並自動進行清理,確保上傳的檔案不含惡意內容。這是一個輕量且易於使用的外掛,適合需要使用 SVG 圖像的網站。

【主要功能】
• 支援將 SVG 檔案上傳至媒體庫
• 自動清理上傳的 SVG 檔案
• 可根據用戶角色設定 SVG 上傳權限
• 媒體庫中顯示 SVG 預覽
• 允許不同用戶角色上傳或清理 SVG 圖像

外掛標籤

開發者團隊

⬇ 下載最新版 (v4.5) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「WP SVG Images」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Securely upload SVG files to your Media Library. Uploaded SVG files are automatically sanitized.
SVG stands for Scalable Vector Graphics and is probably the most efficient way to display images.
WP SVG Images Plugin is an easy-to-use and lightweight plugin that allows you to upload SVG files to your media library safely and easily.
Features

Support for SVG uploads to your Media Library.
Sanitize uploaded SVG files. Malicious SVG/XML files are rejected from upload.
Admin configurable SVG support for different user roles. Ability to disable SVG upload for different user roles.
Different user roles can upload and/or sanitize the uploaded SVG images.
SVG preview in Media Library.

Support
24/7 SVG support offered by ShortPixel here or here.
Recommended plugins
This plugin is supported & maintained by ShortPixel.
Other popular plugins by ShortPixel:
FastPixel Caching – WP Optimization made easy
ShortPixel Image Optimizer – Image optimization & compression for all the images on your website, including WebP delivery – ShortPixel Image Optimizer.
ShortPixel Adaptive Images – On-the-fly image optimization & CDN delivery.
Enable Media Replace – Easily replace images or files in Media Library.
reGenerate Thumbnails Advanced – Easily regenerate thumbnails.
Resize Image After Upload – Automatically resize each uploaded image.
Hooks for developers
WPSVG_setAllowedTags
Allows you to specify more tags that will be not removed during sanitization
add_filter( 'WPSVG_setAllowedTags', 'my_custom_allowed_svg_tags', 10, 1 );
function my_custom_allowed_svg_tags( $tags ){
$tags[] = 'path';
return $tags;
}

WPSVG_setAllowedAttrs
Allows you to specify more attributes that will be not removed during sanitization
add_filter( 'WPSVG_setAllowedAttrs', 'my_custom_allowed_svg_attributes', 10, 1 );
function my_custom_allowed_svg_attributes( $attributes ){
$attributes[] = 'fill';
return $attributes;
}

延伸相關外掛

文章
Filter
Mastodon