Personalized checkout and custom promotions with Shopify Scripts
I have the following code, which theme-check is flagging as "For better performance, prefer using the preload_tag filter":
<link rel="preload" as="font" href="{{ header_font | font_url }}" type="font/woff2" crossorigin>
I tried using this liquid:
{{ header_font | font_url | preload_tag: as: 'font' }}
which generates this code:
<link href="not a real url" rel="preload" as="font" rel="preload">
But as its missing the crossorigin tag, this code isn't used due to CORS
I suspect the preload_tag function needs to be augmented to be able to add crossorigin.
Is there another solution? Thanks
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025