Skip to content

Image component does not work with Storybook #18393

@kodai3

Description

@kodai3

Bug report

Describe the bug

using next/image component in storybook throw Error.

To Reproduce

  1. Set up with-storybook example yarn create next-app --example with-storybook with-storybook-app
  2. Create new story using next/image
import Image from 'next/image'
import React from 'react'

export default { title: 'Image' }
// image url
const url = 'https://......'

export const withNextImage = () => (
  <Image src={url} width={100} height={100} />
)
  1. Start storybook

Expected behavior

show Image without Error as plane image tag do.

Screenshots

image

System information

  • OS: macOS
  • Browser Chrome
  • Version of Next.js: 10.0.0
  • Version of Node.js: v12.16.3

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions