liquid icon indicating copy to clipboard operation
liquid copied to clipboard

preload_tag, rel="preload" attribute added twice

Open bigskillet opened this issue 4 years ago • 6 comments

The preload_tag is adding the rel="preload" attribute twice.

For example, here's the tag I'm using:

{{ 'Font-Name.woff2' | asset_url | preload_tag: as: 'font' }}

...and here's the outout:

<link href="Font-Name.woff2" rel="preload" as="font" rel="preload">

bigskillet avatar Dec 21 '21 20:12 bigskillet

Bump

bigskillet avatar Mar 26 '22 03:03 bigskillet

I'm having this same issue too.

I'm not sure if this will affect the priority of this ticket but this is reported as an error in the W3 HTML validator

davidwarrington avatar Jul 20 '22 11:07 davidwarrington

Still seeing this.

BigglesZX avatar Feb 10 '23 17:02 BigglesZX

bump

shayanabbas avatar Aug 02 '23 20:08 shayanabbas

It also shows up in the liquid output example in the documentation: https://shopify.dev/docs/api/liquid/filters/preload_tag

bigskillet avatar Aug 05 '23 13:08 bigskillet

I've just come across this myself, how was this raised back in 2022 and hasn't been sorted?

lukecharle avatar Mar 16 '24 10:03 lukecharle