• Lucid Gen

    (@lucidgen)


    Hello developers,

    There are 2 problems that you should improve.

    1. My website uses SVG files for icons and the logo. The SVG files not be loaded when offline (both iOS and Android).
    2. PWA can not load CSS files when I enable compress and combile CSS in Litespeed cache plugin (both iOS and Android).

    Thank you!

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

    (@westonruter)

    Regarding the SVG files, are these located in the uploads directory? See the logic for caching uploads. In particular, there is a wp_service_worker_uploaded_image_caching filter which you can use to customize the routes that get cached. By default it includes all file extensions contained in wp_get_ext_types()['image']. Perhaps svg is not included there? Normally WordPress doesn’t allow SVGs to be uploaded. So perhaps the plugin you’re using isn’t extending WP in all the right places?

    Regarding the CSS files, similarly to the uploads caching there is separate logic for themes. You can see by default it only includes the parent theme directory and child theme directory. But the wp_service_worker_theme_asset_caching filter can be used to override the route to point to wherever Litespeed cache is serving its minified assets.

    Thread Starter Lucid Gen

    (@lucidgen)

    Oh thank you for your reply. I’m not familiar with PHP code. How can I implent your advices?

    Can you help me a code to put in my theme’s functions.php to add SVG file and Litespeed cache minified CSS file. I see Litespeed cache CSS link is my-domain/wp-content/litespeed/css/2abda1874b4fac58e331603eb0fe04c3.css?ver=e94c9.

    Thank you!

    Plugin Author Weston Ruter

    (@westonruter)

    Sorry, I don’t have availability to implement this for you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this review.