Skip to content

Commit b342816

Browse files
authored
Merge branch 'master' of https://github.com/BitPatty/next-image-s3-imgproxy-loader into develop
2 parents 009e2fa + aafec71 commit b342816

File tree

3 files changed

+14
-91
lines changed

3 files changed

+14
-91
lines changed

package-lock.json

Lines changed: 3 additions & 90 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"scripts": {
88
"build": "rimraf dist && rollup -c"
99
},
10+
"engines": {
11+
"node": ">=15.7.0"
12+
},
1013
"repository": {
1114
"type": "git",
1215
"url": "https://github.com/BitPatty/next-image-s3-imgproxy-loader.git"

src/index.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,14 @@ const ProxyImage = ({
116116
return `${IMGPROXY_ENDPOINT}?${urlParams.toString()}`;
117117
};
118118

119-
return <Image src={file} loader={imageLoader} {...props} />;
119+
return (
120+
<Image
121+
src={file}
122+
loader={imageLoader}
123+
{...(props.width == null && !props.layout ? { layout: 'fill' } : {})}
124+
{...props}
125+
/>
126+
);
120127
};
121128

122129
export default ProxyImage;

0 commit comments

Comments
 (0)