---
title: "image_url"

doc_type: static
doc_category: static
doc_version: v20260901
source_url:
  html: 'https://developer.shopline.com/docs/handlebars/helpers/media/image-url'
  md: 'https://developer.shopline.com/docs/handlebars/helpers/media/image-url.md'
---
# image_url

Returns the CDN URL of an image.

The `image_url` helper can be applied to the following objects along with their `src` attributes:

[article](https://developer.shopline.com/docs/handlebars/objects/article.md)  
[collection](https://developer.shopline.com/docs/handlebars/objects/collection.md)  
[image](https://developer.shopline.com/docs/handlebars/objects/image.md)  
[line_item](https://developer.shopline.com/docs/handlebars/objects/line-item.md)  
[product](https://developer.shopline.com/docs/handlebars/objects/product.md)  
[variant](https://developer.shopline.com/docs/handlebars/objects/variant.md)  

> **Note**
>
> Regardless of the specified dimensions, the image size cannot exceed its original dimensions.

## Parameters

- `Object` `{Object}`
- `[hash.width]` `{Number}`: Optional.When only the width is defined, the height is computed according to the image's dimensions.
- `[hash.height]` `{Number}`: Optional. When only the height is defined, the width is computed according to the image's dimensions.
- `[hash.quality]` `{Number}`: Optional. Specifies the quality of the image after compression, default is 80 (%).
- `returns` `{String}`: CDN URL.

## Usage

```handlebars
{{ image_url object [width] [height] [quality] }}
```

## Example

<Example data={['product']}>
```handlebars
{{ image_url product width=450 }}
```
</Example>