Skip to content

Commit

Permalink
Allow overriding imageParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
martinnabhan committed Apr 17, 2023
1 parent 700e33e commit 0d64367
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/frameworks/nextjs/src/images/next-image-stub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Object.defineProperty(NextImage, 'default', {
const imageParameters = React.useContext(ImageContext);

return (
<OriginalNextImage {...props} loader={props.loader ?? defaultLoader} {...imageParameters} />
<OriginalNextImage {...imageParameters} {...props} loader={props.loader ?? defaultLoader} />
);
},
});
Expand All @@ -58,9 +58,9 @@ if (semver.satisfies(process.env.__NEXT_VERSION!, '^13.0.0')) {

return (
<OriginalNextLegacyImage
{...imageParameters}
{...props}
loader={props.loader ?? defaultLoader}
{...imageParameters}
/>
);
},
Expand All @@ -78,9 +78,9 @@ if (semver.satisfies(process.env.__NEXT_VERSION!, '^12.2.0')) {

return (
<OriginalNextFutureImage
{...imageParameters}
{...props}
loader={props.loader ?? defaultLoader}
{...imageParameters}
/>
);
},
Expand Down

0 comments on commit 0d64367

Please sign in to comment.