Skip to content

chore: refactor image optimization replacement to work correctly with various versions#1169

Merged
conico974 merged 3 commits into
opennextjs:mainfrom
nicholas-c:chore/image-optimization-refactor
May 20, 2026
Merged

chore: refactor image optimization replacement to work correctly with various versions#1169
conico974 merged 3 commits into
opennextjs:mainfrom
nicholas-c:chore/image-optimization-refactor

Conversation

@nicholas-c

Copy link
Copy Markdown
Contributor

Summary

Following my previous PR (#1162) the image optimization function is incredibly messy and pretty unreadable with nested ternary operators.

Refactor to split internal and external image usage with safer version checking.

Also adds unit tests for this function.

@changeset-bot

changeset-bot Bot commented May 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5234700

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@opennextjs/aws Patch
app-pages-router Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented May 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@opennextjs/aws@1169

commit: 5234700

@sommeeeer sommeeeer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for this!

@conico974 conico974 merged commit c09dcdb into opennextjs:main May 20, 2026
3 checks passed
@github-actions github-actions Bot mentioned this pull request May 20, 2026
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.

3 participants