As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [svg]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
17 votes
3 answers
5k views

SVG files not uploading since most recent WP update

I have a snippet in my functions PHP file that allows me to upload SVG files. Since upgrading to the latest version of WP today, I can no longer upload svgs. I also tried a second code snippet from ...
pjk_ok's user avatar
  • 888
15 votes
1 answer
2k views

For what security reasons are svgs blocked in the media uploader?

I see that SVGs are blocked by default in the media uploader and you have to add it as a supported MIME type in functions.php. What security reasons are behind this?
Claudiu Creanga's user avatar
11 votes
3 answers
6k views

Ways to handle SVG rendering in wordpress?

With the advancement of internet browsers, I find myself more and more comfortable using SVGS when coding websites... especially for icons, and simple graphics that can be replaced on the fly by pngs. ...
gdaniel's user avatar
  • 3,223
8 votes
2 answers
6k views

Can't extract and set SVG dimensions

Up to now, I have had no problems with the background-image thumbnails in my theme. However, now that I'm trying to use an SVG as the featured image, something is breaking. The problem seems to ...
CoderScissorhands's user avatar
3 votes
1 answer
2k views

How do I enable the customize theme page to accept svg's?

I'm currently working on a theme that enables the user to upload a logo via the customize theme page. I want the user to be able to upload an SVG as a logo. Wordpress does not allow SVG's to be ...
user25312's user avatar
2 votes
1 answer
4k views

use of <svg> tag into wordpress

Hi i'm trying to upload a svg map to my wordpress website. I fixed all to be able to upload svg trough the media gallery but then when i try to write the tag into the page it won't recognize it. I ...
antowordp's user avatar
2 votes
2 answers
3k views

SVG image upload stopped working

I have a client website that has the mime type support for SVG's added in the functions file. We've been uploading svg's for over a year. Suddenly it stopped working and is showing the "for security ...
motleydev's user avatar
  • 133
1 vote
1 answer
964 views

Adding extra SVGs to TwentyNineteen child theme using class TwentyNineteen_SVG_Icons

I’m trying to change the svg of the ellipses for the mobile menu. It’s called in this file: template-functions.php so I did a hook on my child theme functions.php to replace it, like so: function ...
Duarte Nunes's user avatar
1 vote
2 answers
1k views

How to implement my own icons instead of using the svg icon system

From WordPress 4.9.2, I created a child theme for twentyseventeen. I noticed that it comes with its own SVG icon system for social media icons at the bottom of the page. I see some of that code ...
klewis's user avatar
  • 826
1 vote
2 answers
5k views

Stylizing external SVG files with jQuery and CSS

I have enabled SVG-file-linking on my WP site using the Safe SVG plug-in, and I'm mostly happy with it. However, I'm having an issue with styling the SVG-paths contained in the external-file I am ...
CoderScissorhands's user avatar
0 votes
1 answer
2k views

Add custom SVG icons to Social Icon MENU in WordPress Twenty Seventeen Child Theme

I'm having trouble adding custom SVG icons to the Social Icon Menu in WordPress Twentyseventeen Child Theme.The menu works fine with all pre-packaged SVGs included with the theme, but I can't add ...
Kelly's user avatar
  • 291
0 votes
1 answer
27 views

Replace Home with image link inside custom header menu

What I want to achieve is a header menu like this: Right now, I have this: I am not far off. To get to where I am currently at, I followed these instructions and added some custom CSS. So I added ...
J86's user avatar
  • 135