Support » Plugin: Autoptimize » css url are not rewriting when HTTP/2 + minify without combine filter is used

  • Resolved itsoft3g

    (@itsoft3g)


    I used 4 filters as you mentioned here https://wordpress.org/support/topic/http2-minification-without-concatenation/ for HTTP/2 + minification without concatenation

    add_filter('autoptimize_filter_js_minify_excluded','__return_true');
    add_filter('autoptimize_filter_css_minify_excluded','__return_true');
    
    add_filter('autoptimize_filter_js_dontaggregate','__return_true');
    add_filter('autoptimize_filter_css_dontaggregate','__return_true');

    CSS urls are not rewriting that include url() and import() calls. Resulting in images and css files are not found.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    good catch @itsoft3g, we’ll look into these and keep you posted. good thing those are still behind filters 😉

    frank

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK @itsoft3g, fix committed on github, would be great if you could download & test the GitHub version (which will be out as 2.3.3 soon-ish)?

    Wow, that’s quick.
    I tested and it’s working great.
    Thanks a lot!

    I hope this feature(HTTP/2 + minify without combine) is needed in UI, many people can look for it 🙂

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    minify without combine will indeed be in AO 2.4 @itsoft3g 🙂

    Fantastic change log!
    Have fun!

    Now url is not changed to CDN url.
    When I try to add CDN url, under this setup CSS url(), import() it is still stays with site url(absolute url).

    • This reply was modified 1 year, 9 months ago by itsoft3g.
    • This reply was modified 1 year, 9 months ago by itsoft3g.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    checked the code & checked on my dev-machine (on localhost with CDN set to //127.0.0.1/ and this actually does seem to work @itsoft3g;

    
    <link rel='stylesheet' id='contact-form-7-css'  href='//127.0.0.1/wordpress/wp-content/cache/autoptimize/css/autoptimize_single_7d5d92ddcbe33c91355c20a1d35e7a95.css' type='text/css' media='all' /><link rel='stylesheet' id='twentyseventeen-fonts-css'  href='https://fonts.googleapis.com/css?family=Libre+Franklin%3A300%2C300i%2C400%2C400i%2C600%2C600i%2C800%2C800i&subset=latin%2Clatin-ext' type='text/css' media='all' />

    the only resources it does NOT work for is if the resource name indicates it has already been minified (i.e. e.g. *.min.js or *-min.css);

    
    <link rel='stylesheet' id='dashicons-css'  href='http://localhost/wordpress/wp-includes/css/dashicons.min.css' type='text/css' media='all' />

    Is this also what you’re seeing?

    Settings: individual css file minifications using above filters.

    Site’s css file link is changing to the CDN link as you mentioned above.
    But url(), import() links inside the css file(which is loading from CDN) is still pointing to site url not the CDN url. I mean the assets like images from the css file.

    I also confirm filename is not having “min” in it.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, now I understand 🙂

    When can I expect the update on this?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    now? 🙂

    CDN’ing resources in non-aggregated CSS will be in AO 2.4, we did a number of commits in the to-become 2.4 codebase on Github the last couple of days to tackle this, feel free to check that out.

    That’s great. I will check and give it a try.
    Will be looking forward for stable release to use it in live site.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘css url are not rewriting when HTTP/2 + minify without combine filter is used’ is closed to new replies.