Skip to content

Conversation

@aldunchev
Copy link

Q                       A
Fixed Issues? Fixes #2263
Patch: Bug Fix? no
Minor: New Feature? Yes
Major: Breaking Change? no
Tests Added + Pass? Yes
Documentation Provided Yes (code comments and or markdown)
Any Dependency Changes? No
License Apache License, Version 2.0

Add fetchpriority attribute support to Image component (v3)

Implements fetchpriority attribute for the Image component to optimize Largest Contentful Paint (LCP) performance.

Changes:

  • Added policy-level configuration in design dialog (default fetchpriority + override toggle)
  • Added component-level override in edit dialog
  • Implemented decision logic: component value overrides policy value (if allowed)
  • Added getFetchPriority() method and updated getHtmlAttributes() in Image interface
  • Added 5 unit tests covering all scenarios

Usage:

Template authors can set default fetchpriority ("high", "low", "auto") in policies and optionally allow content authors
to override per component. Useful for marking hero images as "high" priority to improve LCP.

Fixes #2263

@aldunchev
Copy link
Author

Here is the checkbox to allow the authors to change the fetchpriority attribute:
image

The fetch priority on the image:
image

The final result:
image

@aldunchev aldunchev closed this Oct 16, 2025
@aldunchev aldunchev changed the title [Image v3]: Add fetchpriority attribute support fixes (#2263). [Image v3] #2263: Add fetchpriority attribute support. Oct 16, 2025
@aldunchev aldunchev reopened this Oct 16, 2025
@sonarqubecloud
Copy link

@aldunchev aldunchev changed the title [Image v3] #2263: Add fetchpriority attribute support. [Image v3] #2263: Add fetchpriority attribute support Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Image] Support for fetchpriority attribute

1 participant