Remove Google Fonts & Icons from Elementor | GDPR Compliance

Due to the growing GDPR requirements, embedding external resources is problematic. If your website uses fonts from Google (so-called Google Fonts) without hosting them locally, it may already be subject to legal warnings.

With Elementor, you have a wide selection of fonts (Google) and other resources such as icons. Unfortunately, these are also loaded directly from the respective services, which is not GDPR compliant.

To ensure that these external sources are no longer loaded, I’ll show you a few filter functions here to explicitly disable them.

Remove Google Fonts

add_filter( 'elementor/frontend/print_google_fonts', '__return_false' );

Remove Font Awesome

add_action( 'elementor/frontend/after_register_styles',function() {
foreach( [ 'solid', 'regular', 'brands' ] as $style ) {
wp_deregister_style( 'elementor-icons-fa-' . $style );
}
}, 20 );

Remove Elementor Icons (eicons)

Removing the default Elementor icons is normally not required for GDPR compliance. However, this step can be helpful if the icons are not needed and you want to achieve additional speed improvements for your website’s loading time.

add_action( 'wp_enqueue_scripts', 'remove_default_stylesheet', 20 );
function remove_default_stylesheet() {
wp_deregister_style( 'elementor-icons' );
}

Tip: Use SVG Files for Icons in Elementor

To avoid any GDPR issues and achieve the best possible loading times, I recommend using SVG files. These can be used directly in Elementor.