[**@wocart/storefront v3.1.0**](../../README)

***

[@wocart/storefront](../../README) / [index](../README) / mediaImageSrcset

# Function: mediaImageSrcset()

> **mediaImageSrcset**(`src`, `widths`, `options`): `string`

The same photo at several widths, with width descriptors
(`… 360w, … 720w`), for an `<img>` whose `sizes` says how wide it shows —
a phone then downloads a phone-sized file, in the best format it takes.

## Parameters

### src

`string`

### widths

readonly `number`[]

### options

[`MediaImageSrcsetOptions`](../interfaces/MediaImageSrcsetOptions)

## Returns

`string`

`null` when the photo cannot be resized (see `mediaImageUrl`) or no
width is a positive whole number.
