Skip to content

Commit

Permalink
Merge branch 'canary' into next-swc-publish-flow
Browse files Browse the repository at this point in the history
  • Loading branch information
padmaia authored Aug 11, 2021
2 parents f78e9b9 + 12eb812 commit bee8fbf
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions packages/next/client/image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,6 @@ type OnLoadingComplete = (result: {

type ImgElementStyle = NonNullable<JSX.IntrinsicElements['img']['style']>

interface StaticImageData {
src: string
height: number
width: number
blurDataURL?: string
}

interface StaticRequire {
default: StaticImageData
}
Expand Down Expand Up @@ -607,6 +600,7 @@ export default function Image({
loader,
})}
decoding="async"
data-nimg
style={imgStyle}
className={className}
/>
Expand All @@ -616,6 +610,7 @@ export default function Image({
{...rest}
{...imgAttributes}
decoding="async"
data-nimg
className={className}
ref={(img) => {
setRef(img)
Expand All @@ -640,9 +635,9 @@ export default function Image({
rel="preload"
as="image"
href={imgAttributes.srcSet ? undefined : imgAttributes.src}
// @ts-ignore: imagesrcset is not yet in the link element type
// @ts-ignore: imagesrcset is not yet in the link element type.
imagesrcset={imgAttributes.srcSet}
// @ts-ignore: imagesizes is not yet in the link element type
// @ts-ignore: imagesizes is not yet in the link element type.
imagesizes={imgAttributes.sizes}
></link>
</Head>
Expand Down

0 comments on commit bee8fbf

Please sign in to comment.