#622·mdx-deck

How to use local images

Author: mlouageCreated Jan 3, 2020Updated Sep 19, 2021

Hello

In the sample I see how to use the Image component but how about images I have in my local repository?

  • deck.mdx
  • images/hero.jpg

This does not work

javascript
<Image
  src='./images/hero.jpg'
  style={{
    width: '100vw',
    height: '100vh',
    display: 'flex',
    alignItems: 'center',
    justifyContent: 'center'
  }}>

## Background Image

</Image>

Variations I tried for src are

/images/hero.jpg
images/hero.jpg

All don't show my image.

Many thanks.