> This page is for Designer API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.webflow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.webflow.com/_mcp/server.

# Get Asset MIME Type

## `asset.getMimeType()`

Retrieve the [MIME Type ](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types/Common_types)of a specified asset.

### Syntax

```typescript
asset.getMimeType(): Promise<string>
```

### Returns

**Promise\<*string*>**

A Promise that resolves to the MIME type of the Asset

### Example

```typescript
// Get Selected Element
const el = await webflow.getSelectedElement()

// Check if element is selected and its type
if (!el || el.type !== 'Image') {
  console.error('Please select an Image element on the canvas')
  await webflow.notify({
    type: 'Error',
    message: 'Please select an Image element on the canvas',
  })
} else {
  const asset = await el.getAsset() // Get Asset
  const assetMimeType = await asset?.getMimeType() // Get Asset MIME Type
  console.log(`Asset MIME type: ${assetMimeType}`)
}
```

[Try this example](https://webflow.com/oauth/authorize?response_type=code\&client_id=19511de1ec410f9228d8dcbc9420e67916dea80d86d18f0c9a533eb475ea0f62)

### Designer Ability

Checks for authorization only

| Designer Ability    | Locale | Branch | Workflow | Sitemode |
| :------------------ | :----- | :----- | :------- | :------- |
| **canAccessAssets** | any    | any    | any      | any      |