# 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/11c55b5d212c6c7eaffb12776b3f83f4d38e1ede/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. If you have initialized the "asset matrix", you can use the alias of the texture. If you don't provide the URL, then the alias is used as the URL.

### 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)>>

This function returns an [ImageSprite](/jsdoc/pixi-vn/index/classes/ImageSprite) that you can use to manipulate the component.

## Throws [#throws]

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

## Example [#example]

```ts
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")
```
