• Resolved platoche56

    (@platoche56)


    Hi,

    I have no image optimization plugin active and no other minifying plugin besides W3 total cache. HT access is identical to that given on the install tab and everything else works well.

    The problem is that the plugin changes the path to certainb svg assets when these are called from a minified css file.

    When active the browser requests the below:
    https://****.com/wp-content/cache/minify/content/themes/storefront-child-theme-master-test/assets/svg-files/right-arrow.svg with referer https://*****.com/wp-content/cache/minify/4a012.css

    When css minification is off:
    https://****.gossuin.com/wp-content/themes/storefront-child-theme-master-test/assets/svg-files/right-arrow.svg

    These assets are added in css like below:
    background-image:url(../storefront-child-theme-master-test/assets/svg-files/email.svg)

    Can you help me fix it ?

    Many thanks,

    A

    • This topic was modified 2 years ago by platoche56.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter platoche56

    (@platoche56)

    Intertestingly, when I load the french version (/fr/ subdirectory), the problem goes away… This is because, when French is selected the minification does not apply. ANy reason why ?

    Further to this, I would love to avoid absolute paths as I use the same css across dev, testing and live sites.

    Thanks a lot.

    A

    • This reply was modified 2 years ago by platoche56.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @platoche56

    Thank you for reaching out and I am happy to assist you with this.
    When the files are minified (CSS or js) they are stored in the /cache/minify/ folder from which the files are served afterward.
    As you mentioned, those files are added to the CSS file, and therefore once minified, the path is changed accordingly.
    What you can do is exclude that CSS file from being minified by adding it to Peroformance>Minify>Advanced>Never Minify the following CSS files:
    /wp-admin/themes/yourtheme/assets/css/some-css-file.css
    Please try this and let me know if the problem persists.
    As for your other question, when you are using the WPML or any other plugin for translation, you need to enable the WPML extension in the W3TC Extensions. Can you please share which plugin you are using for translations?
    Thanks!

    Thread Starter platoche56

    (@platoche56)

    Hi,

    Sorry for the duplicate. No idea how this happened…

    Yes I use WPML. So unless I buy the pro license at 99 USD, this will not work ?

    I am willing to entertain the idea of taking the pro plugin but in that case I would want to understand how to do fragment caching for woocommerce. I want to speed up dramatically the load time of my woocommerce pages without breaking functionnality. Do you have a guide anywhere for me to use (a guide that does not simply exclude woocommerce pages but shows how to use fragments on them) ?

    I am a dev so all I need is some examples and?or pointers.

    BR,

    A

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @platoche56

    Thank you for your feedback.
    Yes, the WPML extension is a Pro feature and is only available after upgrading to Pro. Once activated, it improves the caching performance of websites localized by WPML. Meaning that the translated pages will also be minified.
    As for the fragment Caching, PLease note that there is a difference between Page Fragment Caching, and Fragment Caching for transient groups which is a Pro feature.
    The Examples for Fragment Caching and how to implement it are on our wiki page.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Minify changes the absolute path to svg assets’ is closed to new replies.