---
title: ImageDecoder.close()
slug: Web/API/ImageDecoder/close
tags:
  - API
  - Method
  - Reference
  - close
  - ImageDecoder
browser-compat: api.ImageDecoder.close
---
{{securecontext_header}}{{DefaultAPISidebar("WebCodecs API")}}

The **`close()`** method of the {{domxref("ImageDecoder")}} interface ends all pending work and releases system resources.

## Syntax

```js
ImageDecoder.close()
```

### Parameters

None.

### Return Value

{{jsxref('undefined')}}.

## Examples

The following example closes the `ImageDecoder`.

```js
ImageDecoder.close();
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
