
內容簡介
安全上傳 SVG 檔案到您的媒體庫。上傳的 SVG 檔案將自動過濾。
SVG 代表可縮放向量圖形,是最有效率的顯示圖片的方式。
WP SVG Images 外掛是一個易於使用和輕量的外掛,讓您可以安全且容易地上傳 SVG 檔案到媒體庫。
功能
支援將 SVG 上傳到媒體庫。
清理已上傳的 SVG 檔案。不良的 SVG/XML 檔案會被拒絕上傳。
管理員可以設定不同用戶角色的 SVG 支援。可以停用不同用戶角色的上傳 SVG 功能。
不同的使用者角色可以上傳和/或清理上傳的 SVG 圖像。
在媒體庫中預覽 SVG。
支援
24/7 SVG 支援由 ShortPixel 在此或在此處提供。
推薦的外掛
此外掛由 ShortPixel 支援和維護。
ShortPixel 的其他熱門外掛:
ShortPixel Image Optimizer - 對您網站上的所有圖像進行優化和壓縮,包括 WebP 傳送-ShortPixel Image Optimizer。
ShortPixel Adaptive Images - 在線優化圖像和 CDN 提供。
Enable Media Replace - 輕鬆替換媒體庫中的圖像或檔案。
reGenerate Thumbnails Advanced - 輕鬆重新產生縮圖。
Resize Image After Upload - 自動調整每個上傳的圖像大小。
開發人員勾子
WPSVG_setAllowedTags
允許您指定更多在清理期間不會被移除的標籤
add_filter( 'WPSVG_setAllowedTags', 'my_custom_allowed_svg_tags', 10, 1 );
function my_custom_allowed_svg_tags( $tags ){
$tags[] = 'path';
return $tags;
}
WPSVG_setAllowedAttrs
允許您指定更多在清理期間不會被移除的屬性
add_filter( 'WPSVG_setAllowedAttrs', 'my_custom_allowed_svg_attributes', 10, 1 );
function my_custom_allowed_svg_attributes( $attributes ){
$attributes[] = 'fill';
return $attributes;
}
外掛標籤
開發者團隊
原文外掛簡介
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;
}
