theme-tools icon indicating copy to clipboard operation
theme-tools copied to clipboard

The AssetPreload check suggests using `preload_tag` on `font_url` assets, which is not supported

Open nikitaourazbaev opened this issue 3 years ago • 2 comments

Describe the bug The AssetPreload check suggests using the preload_tag tag for a font url but preload_tag does not support font_url

Expected The AssetPreload check should not suggest using preload_tag when the asset’s URL is not supported

Actual The AssetPreload check suggests using preload_tag when the asset’s URL is not supported

Stack trace N/A

Debugging information

  • OS Mac
  • Version 1.11.0

Additional context CleanShot 2022-08-30 at 11 40 43@2x

nikitaourazbaev avatar Aug 30 '22 15:08 nikitaourazbaev

Reminds me that's a platform bug that I have to fix.

charlespwd avatar Aug 30 '22 16:08 charlespwd

Is Shopify able to support font URLs as part of the preload_tag? Ideally this can be done:

{%- liquid
  unless settings.heading_font.system?
    echo settings.heading_font | font_url | preload_tag: as: 'font', type: 'font/woff2', crossorigin: ''
  endunless
-%}

chrisberthe avatar Nov 02 '22 20:11 chrisberthe