Making the SVG file format work for WordPress.
Table of Contents [hide]
Solving an upload "security error" ∞
Change the first line(s):
The most simple change that's succeeded for me is edit the .svg
and make the first line:
<?xml version="1.0" encoding="utf-8"?>
I once had to make the first three lines this:
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg">
Resizing issues ∞
Fucked if I know how to make an SVG work properly. viewBox, width and height seem to be the important things.. but even fiddling with those won't work for some images.
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg xmlns="http://www.w3.org/2000/svg" width="1000px" height="1000px" viewBox="0 0 1000 1000">
Example SVGs ∞
Last updated 2023-12-13 at 05:20:34
oh god svg is a stupid format that's handled badly..
I can't be bothered to figure out how to fix a misbehaving svg, and both inkscape and an online tool or two can't get things working right for some, so converting them into a transparent png is better for resizable thumbnails and the like.
Maybe one day in the future things will be sorted out, but h.265 stills will hopefully come into usage. I doubt those will compete with svg but who knows.
Also hi, why are you even reading this?
poked