Failing to load SVG in wordpress

Home Forums BulletProof Security Pro Failing to load SVG in wordpress

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #38778
    Tin Hoang
    Participant

    Hello,

    I’ve checked that my apache server running in Ubuntu has the svg mime type in the /etc/mime.types file

    image/svg+xml svg svgz

    however when I try to load an svg image from my server and look at the Chrome developer tools > Network > Status column it says

    (Failed) net::ERR_CONTENT_DECODING_FAILED

    Here is the resource and response headers:

    General
    Request URL: https://<DOMAIN>/wp-content/plugins/widgetkit/assets/images/widgetkit-20-wp-hover.svg
    Request Method: GET
    Status Code: 200 OK
    Remote Address: <MYIP>:443
    Referrer Policy: no-referrer-when-downgrade
    
    Response Headers
    Connection: Keep-Alive
    Content-Encoding: gzip
    Content-Length: 3029
    Content-type: image/svg+xml
    Date: Sun, 22 Mar 2020 15:53:36 GMT
    Keep-Alive: timeout=5, max=99
    Server: Apache/2.4.25 (Ubuntu) OpenSSL/1.0.2k

    Am I missing something in my BPS .htaccess configurations?

    Thanks,

    Tin

    #38779
    AITpro Admin
    Keymaster

    This type of error could be caused by an output compression setting in a php.ini file > https://stackoverflow.com/questions/53538607/failed-to-load-resource-neterr-content-decoding-failed-error-while-loading-la or it could be caused by a Google PageSpeed caching problem > https://stackoverflow.com/questions/41475250/error-loading-svg-err-content-decoding-failed or another caching plugin that you are using. The first thing to eliminate in troubleshooting would be any caching plugins that you are using. Try deactivating your caching plugin and clearing both your caching plugin cache and your Browser cache. Let me know what happens.

    #38827
    Tin Hoang
    Participant

    hello,

    Thanks for your reply.  I tried what you suggested to add to the php.ini file and that did not help. I also took a look at all my plugins and there are no caching plugins installed. I also tried to deactivate all my plugins and still I could not load the svgs. So I am thinking its a server configuration issue. Would you know what I need to add to my Apache 2.4.25 server?

    Thanks,

    Tin

    #38830
    AITpro Admin
    Keymaster

    Yeah, not really sure man.  Keep doing Google searches using the error message and of course variations of the error message and other search term variations to figure out the solution. Someone has run into this same problem and figured it out already.  Have not run into this particular problem before so yeah can’t really offer any better advice during this times.  😉

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.