# Function: showImage() (/jsdoc/pixi-vn/index/functions/showImage)



\> **showImage**(`alias`, `imageUrl?`, `options?`): `Promise`\<[`ImageSprite`](/jsdoc/pixi-vn/index/classes/ImageSprite)\<[`ImageSpriteMemory`](/jsdoc/pixi-vn/index/interfaces/ImageSpriteMemory)>>

Defined in: [src/canvas/functions/image-utility.ts:69](https://github.com/DRincs-Productions/pixi-vn/blob/998c1a75c5978f24c0dc137af5f42b90b2803967/src/canvas/functions/image-utility.ts#L69)

Add and show a image in the canvas. This function is a combination of [addImage](/jsdoc/pixi-vn/index/functions/addImage).

Parameters [#parameters]

alias [#alias]

`string`

The unique alias of the image. You can use this alias to refer to this image

imageUrl? [#imageurl]

`string`

The url of the image.

options? [#options]

[`ImageSpriteOptions`](/jsdoc/pixi-vn/index/interfaces/ImageSpriteOptions)

The options of the image.

Returns [#returns]

`Promise`\<[`ImageSprite`](/jsdoc/pixi-vn/index/classes/ImageSprite)\<[`ImageSpriteMemory`](/jsdoc/pixi-vn/index/interfaces/ImageSpriteMemory)>>

A promise that is resolved when the image is loaded.

Throws [#throws]

when `imageUrl` is not provided and `alias` is not registered in the asset cache.

Example [#example]

```typescript
let bunny1 = showImage("bunny1", "https://pixijs.com/assets/bunny1.png")
Assets.add({ alias: "bunny2", src: "https://pixijs.com/assets/bunny2.png" })
let bunny2 = showImage("bunny2")
```
