Skip to content

Magento 2.4 Critical CSS enabled, removes 3rd party icons

I am trying to optimize my M2.4 site by enabling Critical CSS, but I am running into an issue that I can’t seem to resolve.

I am using Google Material icons throughout the site which works as intended, until I enable critical css. When enabled, the icons disappear and I only get the text value of the icons.

I have confirmed that the critical.css file exists and is getting written to the head of the page code. I have tried adding the icons via default_head_blocks.xml and also in css using @import. Neither method seems to work.

Hopefully one of you can suggest a fix here. I’d really like to introduce this option to speed-up the site.

Thanks for any insight here!

Critical CSS off

Critical CSS on