Skip to main content
Skip table of contents

Image Resources

The images included in your project are automatically saved in one place.

You can find image files in EXPLORER window

  • Project namePackage namesrcassetsimages

Use in code

Image files can be uploaded and displayed on the screen through UI Components, but when used in code (*.tsx files), it is recommended to use as follows.

Type

GOOD USAGE

BAD USAGE (Not support)

1

img

import MyIcon from “./assets/images/icon.png";

<img src={MyIcon} />

<img src=”./assets/images/icon.png" />

2

IconButton (MUI)

import MyIcon from “./assets/images/icon.png";

<IconButton>
<img src={MyIcon} />
</IconButton>

<IconButton>
<img src=”./assets/images/icon.png" />
</IconButton>

3

(s)css

// styles.scss

.my-icon {
background: url("../images/pressure.png") no-repeat center;
}

-

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.