{"id":50521,"date":"2016-08-26T10:12:59","date_gmt":"2016-08-26T10:12:59","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-svg-images\/"},"modified":"2025-12-10T11:53:02","modified_gmt":"2025-12-10T11:53:02","slug":"wp-svg-images","status":"publish","type":"plugin","link":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-svg-images\/","author":14099424,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"4.4","stable_tag":"4.4","tested":"6.9.4","requires":"3.0.1","requires_php":"5.6.40","requires_plugins":null,"header_name":"WP SVG Images","header_author":"ShortPixel","header_description":"","assets_banners_color":"56c9d6","last_updated":"2025-12-10 11:53:02","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.me\/resizeImage","header_plugin_uri":"https:\/\/shortpixel.com\/","header_author_uri":"https:\/\/shortpixel.com\/","rating":4.6,"author_block_rating":0,"active_installs":30000,"downloads":306637,"num_ratings":14,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.0":{"tag":"1.0","author":"kubiq","date":"2018-04-11 11:36:02"},"1.1":{"tag":"1.1","author":"kubiq","date":"2017-01-22 19:06:22"},"1.2":{"tag":"1.2","author":"kubiq","date":"2017-10-31 09:18:37"},"1.3":{"tag":"1.3","author":"kubiq","date":"2017-11-22 19:01:48"},"1.4":{"tag":"1.4","author":"kubiq","date":"2018-03-02 20:14:59"},"2.0":{"tag":"2.0","author":"kubiq","date":"2018-04-10 08:13:05"},"2.1":{"tag":"2.1","author":"kubiq","date":"2018-04-10 12:02:44"},"2.2":{"tag":"2.2","author":"kubiq","date":"2018-05-29 13:59:18"},"2.3":{"tag":"2.3","author":"kubiq","date":"2018-05-29 14:28:56"},"2.4":{"tag":"2.4","author":"kubiq","date":"2018-05-29 14:35:51"},"2.5":{"tag":"2.5","author":"kubiq","date":"2018-06-09 18:12:07"},"2.6":{"tag":"2.6","author":"kubiq","date":"2018-06-18 14:27:18"},"2.7":{"tag":"2.7","author":"kubiq","date":"2018-07-06 10:17:41"},"2.8":{"tag":"2.8","author":"kubiq","date":"2018-11-29 09:58:39"},"2.9":{"tag":"2.9","author":"kubiq","date":"2018-12-08 18:55:54"},"3.0":{"tag":"3.0","author":"kubiq","date":"2018-12-10 13:15:42"},"3.1":{"tag":"3.1","author":"kubiq","date":"2019-11-20 15:34:02"},"3.2":{"tag":"3.2","author":"kubiq","date":"2020-03-21 16:05:33"},"3.3":{"tag":"3.3","author":"kubiq","date":"2021-03-10 08:17:19"},"3.4":{"tag":"3.4","author":"kubiq","date":"2021-06-09 08:10:11"},"3.5":{"tag":"3.5","author":"kubiq","date":"2021-08-13 23:19:09"},"3.6":{"tag":"3.6","author":"kubiq","date":"2021-08-13 23:24:34"},"3.7":{"tag":"3.7","author":"ShortPixel","date":"2022-02-15 14:59:34"},"4.0":{"tag":"4.0","author":"petredobrescu","date":"2022-07-10 18:40:16"},"4.1":{"tag":"4.1","author":"petredobrescu","date":"2022-11-28 14:34:28"},"4.2":{"tag":"4.2","author":"petredobrescu","date":"2024-03-25 18:56:19"},"4.3":{"tag":"4.3","author":"petredobrescu","date":"2024-11-19 12:55:17"},"4.4":{"tag":"4.4","author":"petredobrescu","date":"2025-12-10 11:53:02"}},"upgrade_notice":[],"ratings":{"1":0,"2":1,"3":1,"4":0,"5":12},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2701394,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2701394,"resolution":"256x256","location":"assets","locale":""},"icon.svg":{"filename":"icon.svg","revision":2701394,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":2701394,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":2701394,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3416366,"resolution":false,"location":"assets","locale":"","contents":"{\"landingPage\":\"\\\/wp-admin\\\/admin.php?page=wp-svg-images.php\",\"preferredVersions\":{\"php\":\"8.2\",\"wp\":\"latest\"},\"phpExtensionBundles\":[\"kitchen-sink\"],\"features\":{\"networking\":true},\"steps\":[{\"step\":\"installPlugin\",\"options\":{\"activate\":true},\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"wp-svg-images\"}},{\"step\":\"login\",\"username\":\"admin\",\"password\":\"password\"},{\"step\":\"setSiteOptions\",\"options\":{\"wpsvg_settings\":\"a:4:\\\\{s:18:\\\"role_administrator\\\";i:1;s:11:\\\"role_editor\\\";i:1;s:11:\\\"role_author\\\";i:1;s:17:\\\"role_shop_manager\\\";i:1;\\\\}\"}}]}"}},"all_blocks":[],"tagged_versions":["1.0","1.1","1.2","1.3","1.4","2.0","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","3.0","3.1","3.2","3.3","3.4","3.5","3.6","3.7","4.0","4.1","4.2","4.3","4.4"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[197180,2904,3770,54714],"plugin_category":[],"plugin_contributors":[81042,138604],"plugin_business_model":[],"class_list":["post-50521","plugin","type-plugin","status-publish","hentry","plugin_tags-sanitization","plugin_tags-svg","plugin_tags-svg-support","plugin_tags-svg-upload","plugin_contributors-kubiq","plugin_contributors-shortpixel","plugin_committers-petredobrescu","plugin_committers-shortpixel","plugin_support_reps-adrianrus","plugin_support_reps-sixaxis"],"banners":{"banner":"https:\/\/ps.w.org\/wp-svg-images\/assets\/banner-772x250.png?rev=2701394","banner_2x":"https:\/\/ps.w.org\/wp-svg-images\/assets\/banner-1544x500.png?rev=2701394","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/wp-svg-images\/assets\/icon.svg?rev=2701394","icon":"https:\/\/ps.w.org\/wp-svg-images\/assets\/icon.svg?rev=2701394","icon_2x":false,"generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p><strong>Securely upload SVG files to your Media Library. Uploaded SVG files are automatically sanitized.<\/strong><\/p>\n\n<p>SVG stands for <a href=\"https:\/\/en.wikipedia.org\/wiki\/Scalable_Vector_Graphics\">Scalable Vector Graphics<\/a> and is probably the most efficient way to display images. \nWP SVG Images Plugin is an <strong>easy-to-use and lightweight plugin<\/strong> that allows you to upload SVG files to your media library safely and easily.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Support for SVG uploads to your Media Library.<\/li>\n<li>Sanitize uploaded SVG files. Malicious SVG\/XML files are rejected from upload.<\/li>\n<li>Admin configurable SVG support for different user roles. Ability to disable SVG upload for different user roles.<\/li>\n<li>Different user roles can upload and\/or sanitize the uploaded SVG images.<\/li>\n<li>SVG preview in Media Library.<\/li>\n<\/ul>\n\n<h4>Support<\/h4>\n\n<p>24\/7 SVG support offered by <a href=\"https:\/\/shortpixel.com\">ShortPixel<\/a> <a href=\"https:\/\/shortpixel.com\/contact\">here<\/a> or <a href=\"https:\/\/wordpress.org\/support\/plugin\/wp-svg-images\/\">here<\/a>.<\/p>\n\n<h4>Recommended plugins<\/h4>\n\n<p>This plugin is supported &amp; maintained by <a href=\"https:\/\/shortpixel.com\/\">ShortPixel<\/a>.\nOther popular plugins by ShortPixel: \n<a href=\"https:\/\/wordpress.org\/plugins\/fastpixel-website-accelerator\/\">FastPixel Caching<\/a> - WP Optimization made easy\n<a href=\"https:\/\/wordpress.org\/plugins\/shortpixel-image-optimiser\/\">ShortPixel Image Optimizer<\/a> - Image optimization &amp; compression for all the images on your website, including WebP delivery \u2013 ShortPixel Image Optimizer.\n<a href=\"https:\/\/wordpress.org\/plugins\/shortpixel-adaptive-images\/\">ShortPixel Adaptive Images<\/a> - On-the-fly image optimization &amp; CDN delivery.\n<a href=\"https:\/\/wordpress.org\/plugins\/enable-media-replace\/\">Enable Media Replace<\/a> - Easily replace images or files in Media Library.\n<a href=\"https:\/\/wordpress.org\/plugins\/regenerate-thumbnails-advanced\/\">reGenerate Thumbnails Advanced<\/a> - Easily regenerate thumbnails.\n<a href=\"https:\/\/wordpress.org\/plugins\/resize-image-after-upload\/\">Resize Image After Upload<\/a> - Automatically resize each uploaded image.<\/p>\n\n<h3>Hooks for developers<\/h3>\n\n<h4>WPSVG_setAllowedTags<\/h4>\n\n<p>Allows you to specify more tags that will be not removed during sanitization<\/p>\n\n<pre><code>add_filter( 'WPSVG_setAllowedTags', 'my_custom_allowed_svg_tags', 10, 1 );\nfunction my_custom_allowed_svg_tags( $tags ){\n    $tags[] = 'path';\n    return $tags;\n}\n<\/code><\/pre>\n\n<h4>WPSVG_setAllowedAttrs<\/h4>\n\n<p>Allows you to specify more attributes that will be not removed during sanitization<\/p>\n\n<pre><code>add_filter( 'WPSVG_setAllowedAttrs', 'my_custom_allowed_svg_attributes', 10, 1 );\nfunction my_custom_allowed_svg_attributes( $attributes ){\n    $attributes[] = 'fill';\n    return $attributes;\n}\n<\/code><\/pre>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>wp-svg-images<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>4.4<\/h4>\n\n<p>\ud83d\udd12 Security Update<\/p>\n\n<p>Release Date: January 23, 2025<\/p>\n\n<p>\ud83d\udee0\ufe0f Fixes<\/p>\n\n<ul>\n<li>Security Patch: Resolved another potential Cross-Site Scripting (XSS) vulnerability, responsibly disclosed by the amazing team at WordFence and discovered by Ryan Zegar.<\/li>\n<\/ul>\n\n<p>We highly recommend updating to this version to ensure your site remains safe and secure. \ud83d\udcaa\ud83d\udd10<\/p>\n\n<h4>4.3<\/h4>\n\n<p>Release date: June 20th, 2024\n* Fix: Patched a Stored Cross-Site Scripting vulnerability found by Colin Xu and responsibly disclosed by the WordFence team;\n* Compat: Added compatibity with WP All Import plugin;\n* Compat: Tested with the latest versions of WordPress (6.6) and PHP (8.3).<\/p>\n\n<h4>4.2<\/h4>\n\n<p>Release date: April 6th, 2023\n* Compat: Tested on WordPress 6.2;\n* Compat: Updated SVG sanitizer scripts;\n* Tweak: Skip percentage width and height when reading SVG dimensions.<\/p>\n\n<h4>4.1<\/h4>\n\n<p>Release date: August 1st, 2022\n* Tweak: auto hide the settings notice after visiting the settings page;\n* Compat: tested the compatibility with WordPress 6.0;\n* Fix: the settings link and button from the notice now work fine on all WordPress installs.<\/p>\n\n<h4>4.0<\/h4>\n\n<p>Release date: March 29th, 2022\n* New: joined the ShortPixel family;\n* New: added SVG sanitization;\n* New: added settings page where you can enable\/disable SVG upload per user role;\n* Compat: deprecated <code>WP_SVG_FOR_EVERYONE<\/code>.<\/p>\n\n<h4>3.7<\/h4>\n\n<ul>\n<li>tested on WordPress 5.9<\/li>\n<\/ul>\n\n<h4>3.6<\/h4>\n\n<ul>\n<li>fix typo in last update<\/li>\n<\/ul>\n\n<h4>3.5<\/h4>\n\n<ul>\n<li>tested on WordPress 5.8<\/li>\n<li>fix missing width and height for core\/image block<\/li>\n<\/ul>\n\n<h4>3.4<\/h4>\n\n<ul>\n<li>allow SVG uploads only for administrators and editors<\/li>\n<\/ul>\n\n<h4>3.3<\/h4>\n\n<ul>\n<li>tested on WordPress 5.7<\/li>\n<\/ul>\n\n<h4>3.2<\/h4>\n\n<ul>\n<li>tested on WordPress 5.4<\/li>\n<\/ul>\n\n<h4>3.1<\/h4>\n\n<ul>\n<li>tested on WordPress 5.3<\/li>\n<\/ul>\n\n<h4>3.0<\/h4>\n\n<ul>\n<li>added support for Beaver Builder media uploader<\/li>\n<\/ul>\n\n<h4>2.9<\/h4>\n\n<ul>\n<li>tested on WordPress 5.0<\/li>\n<\/ul>\n\n<h4>2.8<\/h4>\n\n<ul>\n<li>fix SVG size as featured image<\/li>\n<\/ul>\n\n<h4>2.7<\/h4>\n\n<ul>\n<li>earlier upload_mimes filter init fix<\/li>\n<\/ul>\n\n<h4>2.6<\/h4>\n\n<ul>\n<li>svg sizing css removed because of many conflicts<\/li>\n<\/ul>\n\n<h4>2.5<\/h4>\n\n<ul>\n<li>fixed svg icon size in plugins updating listing<\/li>\n<\/ul>\n\n<h4>2.4<\/h4>\n\n<ul>\n<li>SVN commit problem<\/li>\n<\/ul>\n\n<h4>2.3<\/h4>\n\n<ul>\n<li>fixed svg icon size in plugins listing<\/li>\n<\/ul>\n\n<h4>2.2<\/h4>\n\n<ul>\n<li>convert svg width and height to float number [PX]<\/li>\n<\/ul>\n\n<h4>2.1<\/h4>\n\n<ul>\n<li>added svg width and height metadata<\/li>\n<\/ul>\n\n<h4>2.0<\/h4>\n\n<ul>\n<li>added svgz support<\/li>\n<li>fixed svg thumbnails<\/li>\n<\/ul>\n\n<h4>1.4<\/h4>\n\n<ul>\n<li>repair count() error<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>4.9 compatibility<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>added size calculation fix for wp_get_attachment_image_src<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>fix for WP4.7.1 bug<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>First version<\/li>\n<\/ul>","raw_excerpt":"Add SVG support to your WP website. Securely upload SVG files, automatic sanitization, Media Library preview.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/50521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=50521"}],"author":[{"embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/shortpixel"}],"wp:attachment":[{"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=50521"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=50521"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=50521"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=50521"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=50521"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=50521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}