Support » Plugin: Safe SVG » 2 problems…

  • Resolved joli7211

    (@joli7211)



    I use a Divi-child theme, with the most recent updates of WordPress & Divi, along with the following plugins:

    Akismet Anti-Spam
    BuddyPress
    Divi Builder
    SafeSVG
    Simple History
    SiteOriginCSS
    Theme Check
    Typekit Fonts for WordPress

    I use Windows 10 as my OS, and the most recent version of Adobe CC (Illustrator & Photoshop).

    I created a logo for my website that was too large to use as is, so I converted it to an SVG. After a lot of trial & error I was finally able to get it down to a reasonable size. My problem is this…

    Even once I got my SVG file down to a reasonable size, it was still too large. Divi recommends images under 200Kb whenever possible, and since this is our logo & it will be “everywhere”, I really wanted to make sure that I get it under 200Kb, so I saved it as a compressed SVG file (from a 518Kb .SVG down to a 192Kb .SVGZ file).

    When I tried to upload the .SVGZ file, it wouldn’t load properly and gave me a broken link. So I tried to see if I could load the .SVG file, and while it did load, I lost some items from my document. I did check to see that it had been properly saved, and when I open the .SVG or the .SVGZ file in my browser window, both files are complete and in working order.

    I’m not sure what the problem is. Could you help me please? Thanks!

    Johane

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • when I open the .SVG or the .SVGZ file in my browser window, both files are complete and in working order.

    Were they opened from the web site, or from your local computer? You might see the note on AddEncoding gzip svgz here: https://wordpress.org/support/topic/svgz-is-not-visible/

    Also, do you have a link to the SVG(z) that we can see?

    joli7211

    (@joli7211)

    Here is a link to a file on my Google drive that has the SVG and the SVGZ file along with screenshots…

    Photos of what I’m seeing and the SVG & SVGZ files…

    They were opened from both locations, both from my local computer. If I open the file directly from my computer, it opens up a browser window and shows my file as it should be. When I tried to open it on my website, while working from the same computer, the SVGZ was not visible at all, and the SVG was missing parts of it.

    Thank you for the link, I will have a look at it.

    Johane

    joli7211

    (@joli7211)

    The link that you share in that other ticket does not work, and I’m not sure about the .htaccess thing. I’m not much of a programmer, so if you could let me know what know what I’m looking for exactly, and where I should include the code, then I’d greatly appreciate it. Thanks!

    Johane

    Quid pro quo, Clarice. I asked for the vector and you gave me a screenshot.

    That aside, in your (S)FTP client and in the web root (where wp-config.php is usually located), there is likely a file called .htaccess. Depending on your (S)FTP client, it may be hidden… you may have to do something like View > “Show Hidden Files” or similar (it varies by client).

    If you edit that file, you can add AddEncoding gzip svgz to it. There is a high probability that it won’t work, which is why I asked for the SVG(z), but it is free to try.

    joli7211

    (@joli7211)

    I apologize… I thought what I had said was more clear than that. To be more specific, in the Google Drive file that is linked, you should find the 2 vector files that I’m working with AND 2 collages of screenshots of what I’m seeing when I try to open the files – either on my computer or in WordPress.

    If you can’t access the file, please let me know and I’ll e-mail the SVG files to you directly. Thank you for your patience with me.

    Johane

    Plugin Author Daryll Doyle

    (@enshrined)

    Hi @joli7211,

    Sorry to hear you’re having issues.

    @hendridm is correct, the issue with SVGZ files is most likely an issue with your server not serving the file format with the GZIP headers, causing it to be parsed incorrectly.

    That said, a normal SVG file should upload correctly. The file you linked is a JPEG, is there any chance we can get a copy of the SVG on its own rather than embedded in another image? Feel free to email it to daryll@wpsvg.com and I’ll take a look into the issue for you some more.

    Cheers,
    Daryll

    joli7211

    (@joli7211)

    Absolutely, I will send it to you immediately. I wonder if the link that I shared was to the Google Drive FILE or to a particular document on my Google Drive. That might by part of the confusion…

    Plugin Author Daryll Doyle

    (@enshrined)

    Hi @joli7211,

    Thanks for sending the files over. The issue with the SVG was that it was stripping the <use elements, hence the missing sections.

    I actually updated the underlying library a few weeks ago and have been testing it myself to make sure there were no security holes and am happy it’s secure. I’ve therefore pushed out an update with the new library 1.6.0.

    If you update to the latest version of the plugin you should be able to upload your SVG with no issues.

    In regards to the SVGZ this is most likely an issue on your server as uploading on mine worked with no issues at all 🙂

    Screenshot of uploaded SVG and SVGZ on my site

    Please let me know when you’ve updated and tested the fix so that I can help further or close this issue.

    Cheers,
    Daryll

    joli7211

    (@joli7211)

    Thank you so much! I upgraded and though it took 2 tries, I was able to upload the SVG file without an issue, I was even able to upload another SVG file without any problems at all. Unfortuantely, as suspected, I was unable to do the same with the SVGZ file.

    As I said earlier, I’m not much of a programmer. I understand that I’m supposed to edit the .htaccess file, but when I look at the file, there is only 1 line of code that doesn’t seem to mean much of anything. This makes me nervous to do anything to the file myself.

    My website provider takes care of a lot of the backroom type coding and the like. What should I ask them to do? The more specific the answer that I can get, the less likely that we’ll need to play an online version of the telephone game with me, who doesn’t speak the language, in the middle…

    Thanks again for all of your help!

    Johane

    Plugin Author Daryll Doyle

    (@enshrined)

    Hi @joli7211,

    Glad that’s working for you now 🙂

    In regards to the SVGZ, you’ll need them to add support for SVGZ files to apache/nginx. Depending on what your server runs.

    For Apache, they’ll need to add the following code to either your .htaccess file, php.ini file or httpd.conf file.

    
    AddType image/svg+xml svg svgz
    AddEncoding gzip svgz
    

    For nginx, you can send them this link.

    Basically, they need to add support for the SVGZ mime type and then let the server know that an SVGZ file is gzip encoded.

    Cheers,
    Daryll

    joli7211

    (@joli7211)

    Awesome! I’ll pass the message along. Thank you so much for helping me sort this out. 🙂

    Johane

    FYI Daryll,

    I’ve been a little busy getting ready for Christmas, so it took me a few days before I could do some work on my website. I was finally able to sit down and get some of it done today & with the help of my service provider, everything is working perfectly.

    Thank you so much to you and to @hendridm for your help and your patience. It was greatly appreciated. Have a very Merry Christmas & Happy New Year!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘2 problems…’ is closed to new replies.