An open API service indexing awesome lists of open source software.

https://github.com/calvin-ll/react-responsive-images-example

React with responsive images
https://github.com/calvin-ll/react-responsive-images-example

Last synced: 11 months ago
JSON representation

React with responsive images

Awesome Lists containing this project

README

          

# React Responsive Images Example

[**Live Demo**](https://react-responsive-images-example.netlify.app)

 

This example uses three webpack loaders: [webpack-image-srcset-loader](https://github.com/Calvin-LL/webpack-image-srcset-loader), [webpack-image-resize-loader](https://github.com/Calvin-LL/webpack-image-resize-loader), and [webpack-image-placeholder-loader](https://github.com/Calvin-LL/webpack-image-placeholder-loader)

### [webpack-image-srcset-loader](https://github.com/Calvin-LL/webpack-image-srcset-loader) and [webpack-image-resize-loader](https://github.com/Calvin-LL/webpack-image-resize-loader)

These two loaders generate a `srcset` string with images of different sizes and the corresponding resized and optimized images. Smaller screens will load smaller images, improving load time.

### [webpack-image-placeholder-loader](https://github.com/Calvin-LL/webpack-image-placeholder-loader)

This loader generates a color for each image, you can use the color as a placeholder before the image loads.

## Project setup

```
npm install
```

### Run development server

```
npm run serve
```

### Compile

```
npm run build
```