manifest / performance / wp-fetchpriority-control
WP Fetchpriority Control
wp-image-fetchpriority-control
by Adam Silverstein, Sabrina Zeidan · github.com/adamsilverstein/wp-fetchpriority-control
★ 3stars
1forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/adamsilverstein/wp-fetchpriority-control/archive/refs/heads/main.zipFrom the readme
Fetchpriority Control
Description
Extends the core image block with a fetchpriority setting.
Since WordPress 6.4, core adds the fetchpriority="high" attribute to the image it estimates will be the LCP image. This plugin allows you to override that setting with a UI control (a dropdown).
By setting the fetchpriority to a specific image you want to prioritize, WordPress core will honor your selection and skip applying the attribute automatically.
Similarly , if you have an image you want to make sure isn't prioritized, you can set the fetchpriority to "low" and WordPress core will not change that priority.
The new Fetchpriority selector under Advanced when an image block is selected:
Fetchpriority options:
Building
Install babel globally:
npm install -g @babel/core @babel/cli @babel/preset-env
Build JavaScript:
babel --presets @babel/preset-react wp-fetchpriority-control.js wp-fetchpriority-controlbabel.js
@TODO: Add a build command
Credits
Thanks to Sabrina Zeidan who created this control for disabling lazy loading (https://github.com/sabrina-zeidan/sz-disable-lazyload/) which was the starting point / inspiration for this plugin.