[wp-trac] [WordPress Trac] #54018: Allow scripts registered via block.json to be enqueued in the footer
WordPress Trac
noreply at wordpress.org
Tue Aug 26 21:59:12 UTC 2025
#54018: Allow scripts registered via block.json to be enqueued in the footer
---------------------------+--------------------------
Reporter: jeremyfelt | Owner: (none)
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.9
Component: Script Loader | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: performance
---------------------------+--------------------------
Changes (by westonruter):
* keywords: has-patch => needs-patch
* status: closed => reopened
* resolution: fixed =>
* milestone: 6.4 => 6.9
Comment:
I'm re-opening this because I [https://weston.ruter.net/2025/05/26
/improve-lcp-by-deprioritizing-interactivity-api-script-modules/ found]
that even with `defer`, scripts printed in the `head` are loaded with a
high priority and compete with the loading of critical resources, like the
LCP image. I've opened #63486 to propose allowing script modules to be
printed in the footer (in block themes), and I've opened #61734 to
introduce `fetchpriority` for scripts and script modules. However, for
block view scripts registered via `block.json`, there should be a way to
override the default priority and location for printing. I opened
[https://github.com/WordPress/gutenberg/issues/71366 Gutenberg#71366]
specifically for updating the schema for `block.json` for both `in_footer`
and `fetchpriority`, but it may end up being redundant with this trac
ticket.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54018#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list