Skip to content

Conversation

@Kaseax
Copy link

@Kaseax Kaseax commented Oct 24, 2025

What:

  • Respect explicit Image prop unoptimized={false} over global images.unoptimized, while retaining auto-unoptimized for data:/blob: and default-loader SVG.

Why:

  • Fixes #85208 where a per-image override could not opt back into optimization.

How:

  • Compute an effective flag once (should/effectiveUnoptimized) based on: data/blob → true; default loader + SVG (when not allowed) → true; else explicit prop if provided; else config default. Use the resolved flag for generateImgAttrs, meta, and export mode checks.

Tests:

  • Added unit tests: test/unit/next-image-get-img-props.unoptimized-override.test.ts

@ijjk
Copy link
Member

ijjk commented Oct 24, 2025

Allow CI Workflow Run

  • approve CI run for commit: df17d46

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

1 similar comment
@ijjk
Copy link
Member

ijjk commented Oct 24, 2025

Allow CI Workflow Run

  • approve CI run for commit: df17d46

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image component unoptimized property cannot override next.config.ts unoptimized setting

2 participants