Home Forums General Issues SVG Images Not Attaching


SVG Images Not Attaching

  • I can no longer add SVG’s to custom image fields…I try to attach and nothing happens..just go back to the post page and it says no image attached.

    Svgs were working before I upgraded to pro – anyone else having this problem?

  • Yup, same issue here.
    just says “no image attached”

    I have just ACF pro activated plugin wise

  • Ok, after some digging, from what I can tell is SVG preview’s are not supported at all in WP 4.0 unless previewing on the image attachments edit page. I can only assume this is connected to the ACG image previewing ability.

    If you’re running WP 4.0 and try to preview your SVG’s in the media manager do you see them OK?

    Also, a colleague did confirm that the data is still being stored and rendered in the front end although the field/preview still says “no image attached”… so it technically seems to be working BUT the preview is not.

  • Ok, I lied, after testing I’m not able to return anything on the front end 🙂
    so not entirely sure it is actually saving/storing.

    I ran a var_dump and it returned string '' (length=0)

  • I downgraded to 5.0.7 and everything is working again – so not sure what happened with 5.0.8 – but saw another thread with folks having problems with images period in 5.0.8, not just svgs.

    Downgrade has solved the problem for now!

  • ya too funny, i actually had a small aneurism thinking I’ll just go the good ol png route for now BUT then one of my png’s wouldn’t even save! lol. I couldn’t believe it. some would and some wouldn’t. Seems like something in 5.0.8 is causing a muck.

    fingers cross on a patch soon 🙂

  • Hi,

    I am getting this as well. Running latest wordpress; ACF Pro 5.0.8

    I have a dev site running the old ACF (Pre ACF Pro) on latest WP and it works fine…

    Does downgrading to ACF PRO 5.0.7 work then?


    Does anyone know how I can get a copy of ACF Pro 5.0.7 please? (Don’t have a local copy 🙁 )

    …Found it under account settings

  • Hope this helps:

    Looking at the console in chrome. I get the following error when trying to pick an SVG file:

    Uncaught Error: A “url” property or function must be specified


  • Reverting to 5.0.7 worked for me. I’m holder off on upgrading sites – hopefully fixed in .0.9

  • Hi guys

    Please note this is fixed in the latest versions


  • Hello,

    I am having this issue again now with WP 4.3 and ACF pro 5.3.
    I can upload svg into wordpress editor and I can also preview them in the post editor but when I click on “save / publish” the image dissappears and after loading the post again the image field is empty. Any ideas?

  • I’m seeing this bug unresolved with the same issues as the previous post.

    On WordPress 4.2.2 with ACF PRO 5.3.5

    I have a custom field of type “Image”. I upload an SVG (attached here for testing). It uploads to the Media Library, and displays correctly on the post (see pre-update.png). However, when I Publish/Update the post, the page reloads and it does not show the preview image, and instead it says “No Image Selected” as if it didn’t upload properly (see post-update.png).

    On the back end, the SVG image pulls in correctly so I can use it in my custom theme. So it’s not a show stopper. But, it is troublesome looking and my clients have noticed this. Any suggestions to debug?

  • Hi-

    although using current WP (4.5.2) and ACF pro (, I am having the same issue. SVGs will not attach to ACF, though they will show on front end. When you return to edit the page, the image field will display as if there was never an image uploaded. Secondly, when you then go to replace the image, it won’t show any previously uploaded svgs.

  • Having the same issue as swieder227

    ACF Pro
    WP Version 4.5.2

  • +1 for this, it’s not working with latest WP and latest ACF as of this message

  • this is silly. he responded via PM to a support request and solved the problem.. why did he not update here?

    this solves the problem. stop using whatever method you’re trying and just try that. worked for me.

  • Annnnnnd it works if you set the field to “file” and not “image”. Still gets the url from the array’s [‘url’] key so can be used in an img tag easily. In betweeny fix until we get full svg support?

Viewing 17 posts - 1 through 17 (of 17 total)

The topic ‘SVG Images Not Attaching’ is closed to new replies.