• Resolved alexWP333

    (@alexwp333)


    My development site (version 4.7.5) is on my local server. I installed/activated your plugin, and the SVG file is now up in the Media Library, which is great! But, when I go to the web page, the SVG isn’t displaying. Firebug is telling me “Could not load the image”. When I swap in a jpeg image then it displays fine. Is there something that WordPress is doing to prevent the SVG from displaying?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Daryll Doyle

    (@enshrined)

    Hey!

    Can you see the SVG in the media library or is it just a placeholder?

    I’m going to make a wild guess and say that either the SVG corrupted which I’ve not seen very often or that your server is serving SVGs with an incorrect mime type.

    If you open the SVG on your server directly in your browser can you see it then?

    Cheers,
    Daryll

    Thread Starter alexWP333

    (@alexwp333)

    Hey, thanks for the quick reply!

    The SVG in the Media Library is currently just a blank placeholder.

    When I open the SVG directly on my server it displays fine.

    Hope this helps.

    A

    Thread Starter alexWP333

    (@alexwp333)

    Using Firebug, I went to Network > Images. When I select the SVG file, Firebug shows that the Content-Type is “image/svg+xml”. Is this the same as the mime type that you mentioned?

    Plugin Contributor Daryll Doyle

    (@enshrined)

    Yeah image/svg+xml is the correct mime type. I’ve just tested the plugin on another site I have and it’s still functioning correctly there so I’m guessing it’s an incompatibility somewhere.

    Do you have any other plugins installed that affect the media library? If so can you try disabling them all and checking if it works then.

    If that doesn’t work, can you let me know the site that you’re having issues with and the location of the SVG? Feel free to email this to me at [email protected] if that’s easier for you.

    Thread Starter alexWP333

    (@alexwp333)

    Okay, I figured out what was wrong, and it had nothing to do with your plugin.

    I had put together a logo using Adobe Illustrator, and in saving the file as an SVG there’s a specific “Export for Screens” option that I failed to select. Selecting this option brings up a dialog box that prompts us to export an “Artboard”, which I did. After swapping in this new SVG file, it now displays on both the Media Library, and the web page!

    Thanks again for your quick replies.

    Alex

    Plugin Contributor Daryll Doyle

    (@enshrined)

    Thanks for the update Alex,

    Glad you got it fixed.

    Cheers,
    Daryll

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘SVG is in Media Library, but doesn’t display on web page’ is closed to new replies.