WordPress Performance Team Is Working on a Module for SVG Uploads – WP Tavern


If you have ever tried to upload an SVG (Scalable Vector Graphics) file for a logo or favicon in WordPress, you may have been astonished to find that it doesn’t work. There is no core support so users rely on plugins like SVG Support (900K+ installs) or Safe SVG (600k+ installs) to upload SVG files to the media library and use them like any other image file.

The main advantage of SVG files is they can scale to any dimension without losing quality. They are also compact and SEO-…….

Everytime You have ever tried to add an SVG (Scalable Vector Graphics) file for a emblem or favicon in WordPress, You can have been astonished To Search out that it doesn’t work. There’s not a core assist so clients Rely upon plugins like SVG Support (900K+ installs) or Protected SVG (600k+ installs) to add SVG information to the media library and use them like One other picture file.

The primary benefit of SVG information Is that they will scale to any dimension with out dropping extreme quality. They’re additionally compact and Search engine optimization-nice as a Outcome of they are saved in XML textual content material information That Can be crawled and listed.

WordPress contributors have been discussing including SVG assist for Greater than 9 years. It was talked to demise with numerous proofs of idea and no clear path forward, and the ticket finally turned A spot the place people periodically cease by and remark that it’s “a goddamn tragedy that WordPress doesn’t assist this but.”

Regardless of the format having almost common assist throughout The internet, there are safety considerations Associated to scripted SVGs, the place information might include a malicious script. Without an SVG sanitizer library, clients Can be including SVG information at Their very personal hazard.

Inside The Latest Efficiency Group meeting, contributors proposed The thought of Engaged on A mannequin new SVG provides module. They’re first aiming To permit clients to add SVG information with out scripts And current an SVG preview in the Media Library.

Although Greater than A million WordPress clients have put in a plugin So as to add SVG provides to their websites, none Of these plugins are function plugins. That is the rationale the Efficiency Group has opted to create a module Contained in the Efficiency Lab plugin. It permits the team To raised look at the function in the wild earlier than proposing it for WordPress core.

Taking A look at current implementations in plugins, the team found Lots of them supply extra options than the scope of this module Would Embrace. The most properly-appreciated plugins all presently use the SVG Sanitizer library, as does a Drupal module and an integration for TYPO3 CMS.

Efficiency team contributors have recognized WordPress 6.2 as A smart objective for proposing the module for core. Anyone who Desires to contribute can be a part of their efforts on GitHub.

Class: Information, WordPress

Source: https://wptavern.com/wordpress-performance-team-is-working-on-a-module-for-svg-uploads