HTML fetchpriority Attribute

Beginner
6 min read
Updated: Nov 2026
3 examples
Live preview

Definition and Usage

The fetchpriority attribute hints the relative priority of a fetch for <img>, <link>, and <script>. Values are high, low, and auto (default).

Boost the LCP / hero image with fetchpriority="high" (and keep it eager). Mark decorative or late images low. Do not mark everything high — that defeats prioritization.

Hint for the network stack.

Browsers already prioritize; fetchpriority lets you correct known cases like the LCP image.

Not a substitute for preload.

Critical fonts/CSS may still need <link rel="preload">. Use fetchpriority to refine, not replace, a solid loading strategy.

HTML Syntax

syntax.html
<img|link|script fetchpriority ="high|low|auto">

Default is auto. Especially useful on the LCP img and selected preloads.

Attribute Values

ValueDescriptionTry it
highHigher relative fetch priorityTry it
lowLower relative fetch priorityTry it
autoBrowser default priorityTry it

Live Preview

Set fetchpriority on a sample image. Priority is best observed in the Network panel.

Changing the attribute updates markup; reload-based priority is easiest to inspect in DevTools.

Result
CodeToFun logo

fetchpriority="high"

HTML Examples

Example 1 — Prioritize the Hero Image

Mark the LCP candidate high and keep it eager.

HTML
<img src="/images/hero.webp" alt="Product hero"
     width="1200" height="630" loading="eager" fetchpriority="high">
Try It Yourself

How It Works

  1. Identify the LCP image (usually the hero).
  2. Set fetchpriority="high" on that img.
  3. Keep loading eager (do not lazy the hero).
  4. Avoid marking many resources high.

Example 2 — Deprioritize Late Images

Lower priority for non-critical below-the-fold media.

HTML
<img src="/images/footer-badge.webp" alt=""
     width="120" height="40" loading="lazy" fetchpriority="low">
Try It Yourself

How It Works

  1. Use low for decorative or late images.
  2. Combine with lazy when offscreen.
  3. Empty alt only when purely decorative.
  4. Leave primary content at auto/high.

Edge Cases & Pitfalls

Priority inflation makes every request “important” — be selective.

lcp

One hero, not ten

Only the true LCP candidate usually needs high.

lazy

Do not lazy + high

Lazy heroes fight themselves; keep LCP eager + high.

hint

Still a hint

The browser may override based on its own heuristics.

preload

Coordinate with preload

Duplicate competing hints can confuse prioritization — keep one clear strategy.

Browser Support

fetchpriority is an HTML attribute for browsers. It is not a Node.js, Deno, or Bun API.

✓ Widely available · modern

fetchpriority

Supported in current Chromium, Firefox, and Safari for prioritizing fetches.

90% Global support (approx.)
Google Chrome 101+
Full support
Mozilla Firefox 128+
Full support
Apple Safari 17.2+
Full support
Microsoft Edge 101+
Full support
Opera 87+
Full support
Samsung Internet 19+
Full support
Internet Explorer No support
Not supported
fetchpriority Modern browsers

Bottom line: Boost the LCP image with high; demote noise with low; leave the rest auto.

Key Takeaways

  • Values: high, low, auto.
  • Best use: LCP img with high + eager.
  • Elements: img, link, script.
  • Be selective: not everything can be high.

One line: fetchpriority="high" boosts critical fetches like your LCP image.

Frequently Asked Questions

It hints whether a fetch for an img, link, or script should be relatively high, low, or auto priority.
Most often on the LCP / hero image (with loading eager). Avoid marking many resources high.
For non-critical images or late scripts (for example analytics) that should yield to important content.
Yes. Omitting fetchpriority is like auto — the browser decides.
No. Preload still discovers critical resources early; fetchpriority refines priority.
Commonly img, link, and script in modern browsers.

Next: for

Associate labels with form controls using the for attribute.

for tutorial →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful