
外掛標籤
開發者團隊
② 後台搜尋「Media and Safe SVG File Upload Rules by CodeCaste」→ 直接安裝(推薦)
原文外掛簡介
Media and Safe SVG File Upload Rules by CodeCaste lets you decide which files can be uploaded to your site and how big they can be. You set the rules once, and they are applied everywhere files can come in.
What you can do
Set one size limit for all files. For example, nothing larger than 5 MB.
Give a file type its own limit. For example, 2 MB for PNG, 50 MB for MP4 and 10 MB for PDF.
Limit image resolution. Pick a preset such as HD, Full HD, QHD or 4K from a dropdown, or choose Custom to enter your own width and height. For example, no PNG larger than 1920 x 1080 px.
Block a file type completely. Any file with that extension is refused, whatever its size.
Allow SVG files safely. WordPress blocks SVG by default because SVG files can hide harmful code. Turn SVG on and the plugin cleans every SVG before it is saved.
Clear error messages. When a file is refused, the person uploading sees the reason, such as the file being too large, too high-resolution, or its type being blocked.
Where the rules apply
Rules cover the Media Library, the block editor, REST API uploads and files WordPress downloads from a URL (sideloading). Uploading a plugin or theme ZIP is not affected.
