diff --git a/templates/components/Icon.html.twig b/templates/components/Icon.html.twig
index 429ff53b34..4a2b34ddcd 100644
--- a/templates/components/Icon.html.twig
+++ b/templates/components/Icon.html.twig
@@ -6,8 +6,9 @@
{% elseif icon.svgContents %}
{{ icon.svgContents|raw }}
{% else %}
+ {% set prefixesToReplace = {'fa fa-': 'fa:', 'fas fa-': 'fa-solid:', 'fa-solid fa-': 'fa6-solid:'} %}
{% guard function ux_icon %}
- {{ ux_icon(icon.name, attributes.all) }}
+ {{ ux_icon(icon.name|replace(prefixesToReplace), attributes.all) }}
{% endguard %}
{% endif %}