{"id":1790,"date":"2024-12-26T12:34:17","date_gmt":"2024-12-26T11:34:17","guid":{"rendered":"https:\/\/wpmastertoolkit.com\/module\/telechargement-svg\/"},"modified":"2024-12-31T18:08:38","modified_gmt":"2024-12-31T17:08:38","slug":"telechargement-svg","status":"publish","type":"module","link":"https:\/\/wpmastertoolkit.com\/en\/module\/download-svg\/","title":{"rendered":"SVG download"},"content":{"rendered":"<h1 class=\"wp-block-heading\">SVG Upload: A revolutionary update for your WordPress media library<\/h1>\n\n\n\n<p>Managing multimedia files is essential for all WordPress users. However, by default, WordPress restricts the import of SVG files for security reasons. WPMasterToolKit's SVG Upload module fills this gap by allowing SVG files to be imported into the media library. This article will explain how this module works and why you should use it to enhance the flexibility of your WordPress site.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Which plugin can SVG Upload replace?<\/h2>\n\n\n\n<p>WPMasterToolKit's SVG Upload module is capable of replacing various plugins dedicated to importing SVG files, such as \"Safe SVG\" or \"SVG Support\". These plugins are often used to bypass the default limitations of WordPress. However, our module stands out for its simplicity and direct integration within the same WPMasterToolKit plugin, which limits the number of plugins activated and thus improves site performance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How does the SVG Upload module work?<\/h2>\n\n\n\n<p>To enable the import of SVG files, the module uses several essential WordPress filters. First of all, it includes the MIME type for SVG and SVGZ files in the list of permitted file types when uploading (function <code data-no-auto-translation=\"\">add_svg_mime_type<\/code>). This ensures that the user is no longer faced with the problem of file type restrictions during import.<\/p>\n\n\n\n<p>In addition, before any SVG file is accepted for import, the module maintains a level of security by checking the file via the <code data-no-auto-translation=\"\">sanitize_svg<\/code>. This sanitization process uses the <code data-no-auto-translation=\"\">enshrined\/svg-sanitize<\/code> to ensure that the content of the SVG file does not pose a security risk.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to use this module<\/h2>\n\n\n\n<p>The SVG Upload module is easy to use. Once activated in the WPMasterToolKit plugin, it requires no manual intervention to start working. Users can directly upload SVG files via the media library without encountering any error messages. From the WordPress dashboard, in the \"Media\" section, you can upload your SVG files just like any other file type.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Our technical choices<\/h2>\n\n\n\n<p>Security being a major concern when importing SVG (considered vulnerable due to its XML content), we've adopted the powerful <code data-no-auto-translation=\"\">enshrined\/svg-sanitize<\/code> to clean and secure all SVG files. The sanitization process eliminates any unwanted code that could compromise site security. The integration of this feature reduces the need for users to worry about possible security flaws when downloading SVG files.<\/p>\n\n\n\n<p>Two custom WordPress filters are used to accomplish this task efficiently: <code data-no-auto-translation=\"\">wp_check_filetype_and_ext<\/code> and <code data-no-auto-translation=\"\">wp_handle_upload_prefilter<\/code>. The filter <code data-no-auto-translation=\"\">wp_check_filetype_and_ext<\/code> is mainly for verifying WordPress version and adjusting SVG file settings. As for <code data-no-auto-translation=\"\">wp_handle_upload_prefilter<\/code>It ensures that each SVG file is properly cleaned before finalizing the download.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>WPMasterToolKit's SVG Upload module is an ingenious solution for WordPress users looking to expand the capabilities of their multimedia library without compromising their site's security. With its simple, secure approach, the module eliminates the frustration associated with SVG upload limitations and offers more secure integration of SVG content on your WordPress platform. Try this module today and discover how it can simplify the management of your multimedia files.<\/p>","protected":false},"excerpt":{"rendered":"<p>WPMasterToolKit's SVG Upload module is an innovative solution for WordPress, enabling the secure import of SVG files into the media library, a feature restricted by WordPress by default for security reasons. Replacing other plugins such as \"Safe SVG\", this module integrates directly into WPMasterToolKit, simplifying use and optimizing site performance. Thanks to its \"sanitization\" method, using the enshrinedsvgSanitizeSanitizer library, it ensures the security of imported SVG files, making the management of multimedia files more flexible and without risk to site security.<\/p>","protected":false},"featured_media":0,"parent":0,"template":"","meta":{"_acf_changed":true,"_seopress_robots_primary_cat":"","_seopress_titles_title":"Boostez WordPress : Importez des SVG en toute s\u00e9curit\u00e9","_seopress_titles_desc":"Importez des fichiers SVG en toute s\u00e9curit\u00e9 avec SVG Upload de WPMasterToolKit et optimisez votre site WordPress.","_seopress_robots_index":"","_surecart_dashboard_logo_width":"180px","_surecart_dashboard_show_logo":true,"_surecart_dashboard_navigation_orders":true,"_surecart_dashboard_navigation_invoices":true,"_surecart_dashboard_navigation_subscriptions":true,"_surecart_dashboard_navigation_downloads":true,"_surecart_dashboard_navigation_billing":true,"_surecart_dashboard_navigation_account":true},"class_list":["post-1790","module","type-module","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/module\/1790","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/module"}],"about":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/types\/module"}],"wp:attachment":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/media?parent=1790"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}