![alt text](https://raw.githubusercontent.com/snowballdigital/react-image/HEAD/media/logo.png "An illustration of an atom")

# React Srcset Images for Crystallize

A React package to output an img tag with different source variations from Crystallize using srcset. Use this to easily build responsive images powered by the [Crystallize headless commerce service](https://crystallize.com/).

[React Image Srcset resource home](https://crystallize.com/developers/react-components/react-image-srcset).

## How to use

```
yarn add @crystallize/react-image
```

## How to use

```
import Image from '@crystallize/react-image';
```

```
<Image
    src={src}
    alt={image.alt}
/>
```

## Support for PIM Image objects (v2.5.0+)

```
<Image
    crystallizeImgObj={i}
    withZoom // Optional: Click image to zoom in
    sizes="" // Optional: Replace default media queries for srcset
/>
```

## Options

### src[string]: required

### alt: required
