diff --git a/code/frameworks/nextjs/src/next-image-loader-stub.ts b/code/frameworks/nextjs/src/next-image-loader-stub.ts index 6ebc675d85bf..b506cba14e27 100644 --- a/code/frameworks/nextjs/src/next-image-loader-stub.ts +++ b/code/frameworks/nextjs/src/next-image-loader-stub.ts @@ -16,7 +16,7 @@ const nextImageLoaderStub: RawLoaderDefinition = function (conten this.emitFile(outputPath, content); - const { width, height } = imageSizeOf(content); + const { width, height } = imageSizeOf(this.resourcePath); return `export default ${JSON.stringify({ src: outputPath, @@ -28,4 +28,4 @@ const nextImageLoaderStub: RawLoaderDefinition = function (conten nextImageLoaderStub.raw = true; -export = nextImageLoaderStub; +export default nextImageLoaderStub;