Questions tagged [svg]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
17
votes
3answers
4k 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 ...
15
votes
1answer
1k 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?
9
votes
3answers
4k 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. ...
7
votes
2answers
3k 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 ...
4
votes
2answers
5k views

Understanding SVG vulnerabilities in Wordpress related to a specific fix

I have enabled SVG uploading for my Wordpress logo using the answer provided on this stack link, despite having read, in numerous places, that SVG support in a Wordpress site opens it up to scripting ...
3
votes
1answer
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 ...
1
vote
1answer
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 ...
2
votes
2answers
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 ...
1
vote
1answer
744 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 ...
1
vote
2answers
4k 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 ...
0
votes
2answers
933 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 ...
0
votes
1answer
23 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 ...