Skip to content

Commit

Permalink
Allow overriding imageParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
martinnabhan authored and valentinpalkovic committed Apr 25, 2023
1 parent 20511f0 commit 0a29a0b
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 0a29a0b

Please sign in to comment.