Home Forums ACF PRO Image minimum width/height and SVGs Reply To: Image minimum width/height and SVGs

  • If anyone is still having a problems with this, one thing I noticed that was caused an issue with uploading SVGs is the lack of a proper <xml> tag at the start of every SVG file. So now I make sure to add a <?xml version="1.0" encoding="utf-8"?> to the start of every SVG file.

    Also, I make sure to have height, width and viewBox declarations in the opening <svg> tag as well. So something like <svg xmlns="" width="100" height="200" viewBox="0 0 100 200" xml:space="preserve" y="0" x="0" version="1.1">.

    Since I started doing that, I haven’t had any problems with uploading SVGs.

    TIP: I’d also recommend to install an awesome little plugin called Safe SVG, which adds secure SVG upload capability to WP, and as a bonus helps display SVGs properly in the Media library. Otherwise your Media Library will be filled with a bunch of generic WP placeholders, instead of actual SVG image thumbnails.