• Resolved JenkinsTR

    (@jenkinstr)


    Hi Ben,

    As per your request I’ve started a new thread to outline the featured image issue.

    Basically, any SVG that I’ve added as a featured image to any post or custom post type is not showing on the front-end (not being parsed at all, code ends with <img class="style-svg"> with no file actually loaded into the source)

    https://www.jenkinsmedia.com.au/news/
    The post in question is the “Some insight into WordPress random 404 pages”
    Using this SVG as the featured image: https://commons.wikimedia.org/wiki/File:Wordpress-Logo.svg

    With the file located at https://www.jenkinsmedia.com.au/wp-content/uploads/2015/10/Wordpress-Logo.svg

    The SVG plugin itself is functioning very well so far, the logo of my site is SVG enabled by your plugin.

    Although I had to add the mime type separately with another plugin called Media Library Assistant in order to upload SVG images.

    WPMS installed on my site.
    – Using Enfold 4.0.2

    With the following plugins enabled:

    • Accelerated Mobile Pages – v0.9.44
    • AMP – v0.4.2
    • Better Search Replace – v1.3
    • Cache External Scripts – v0.3
    • Coming Soon Page & Maintenance Mode by SeedProd – v5.0.9
    • Select Crayon Syntax Highlighter – v2.8.4
    • Google Analytics Dashboard for WP – v4.9.6.2
    • Limit Login Attempts – v1.7.1
    • ManageWP – Worker – v4.2.16
    • Media Library Assistant – v2.41
    • Multisite Admin bar Switcher – v1.2.5
    • MultiSite Clone Duplicator – v1.4.1
    • Multisite Directory – v0.2.2
    • Multisite Enhancements – v1.3.8
    • Multisite User Sync – v1.1
    • Remove Yoast SEO comments – v2.0.1
    • SVG Support – v2.3.6
    • Ultimate Member – v1.3.83
    • W3 Total Cache – v0.9.5.2
    • WooCommerce – v2.6.14
    • WooCommerce Google Analytics Integration – v1.4.0
    • WooCommerce PayPal Express Checkout Gateway – v1.1.2
    • Wordfence Security – v6.3.4
    • WordPress Importer – v0.6.3
    • WP All Import – Yoast WordPress SEO Add-On – v1.1.5
    • WP Smush – v2.6.1
    • Yoast SEO – v4.4

    I’ve also noticed that the SVG isn’t displayed in the “image” column of the All Posts screen in the backend as well with the same issue, code stops with <img class="style-svg">

    Any help is much appreciated.

    Cheers, Jenkins

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Benbodhi

    (@benbodhi)

    Hey, thanks for starting your own thread ??

    Firstly, you shouldn’t need another plugin to add the mime type to upload SVG files, that is at the core of what my plugin does… but because you are using the Media Library Assistant plugin which we found a long time ago needs a bit of extra work:
    – You need to add the mime type for svg and/or svgz to MLA Settings –> Media Library Assistant –> Uploads (tab) and then they work together.

    Then, by the look of it, you don’t need to be inlining your SVG file at all, so therefore do not need to add the “style-svg” class or tick the inline featured image box. You can just use SVG files like any other image without inlining them. The only reason you would inline them is if you want to target elements within the SVG for animation or something using CSS or JS.

    It is strange nonetheless that the IMG tag is cut short like that and I feel like it would be to do with your theme. To be sure, you would need to test by reverting to a default WP theme and additionally deactivating all other plugins… Which is obviously best done on a staging site if you have one set up.

    There has actually been a few little issues for a select few recently with the featured image file, which I will be fixing as soon as possible. It may possibly have some affect. You can read about those in recent threads.

    I remember you said you tried the featured image with the inline functionality ticked and unticked with no luck.

    I have a strong feeling it is to do with the way featured images are handled by the theme, but could also be an issue with the featured image code in my plugin which I’ll be editing as soon as possible.

    Thanks for your support and patience! I hope you can get it sorted in the meantime and I’ll be sure to hit this thread again once I update the plugin.

    Cheers

    Thread Starter JenkinsTR

    (@jenkinstr)

    Hey man, not a problem ??

    Yeah, I figured out the MLA steps to add the SVG when I first set up your plugin. I thought it was strange that after reading your plugins description, I still couldn’t upload an SVG.
    I’ve been using MLA for a long time, but at the time of installing your plugin and testing it out, MLA wasn’t installed.
    They actually already have the mime type(s) in their “uploads” tab, it’s just disabled by default, and near the end of the list.

    Good news, though!
    Your suggestion about not needing inline SVG’s gave me an idea;
    I disabled advanced mode and bam!, Featured SVG images now working ??

    Thanks again for your prompt support and for your awesome plugin Ben!

    Just FYI, I came across your plugin by inspecting the code of one of the most popular and respected Hosting companies in Australia (VentraIP), it appears they use your plugin extensively throughout their site. It probably contributes massively to their page speed and high SEO ranking too. Wonderful stuff! ??

    Cheers, Jenkins

    Plugin Author Benbodhi

    (@benbodhi)

    Great news it’s working for you now, definitely narrows it down for me knowing it’s just to do with inlining featured images.

    That’s really cool that they use my plugin, all the smart people do ??

    It’s my pleasure to be able to help. Thanks for your support using my plugin!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘SVG featured image issue’ is closed to new replies.