This small project demonstrates loading images in react using url-loader
. By tweaking the limit
setting of the url-loader you can manage from which size images should be a link and which ones a base64 encoded image that will be placed inline in the HTML document.
It's nothing fancy but the master branch is online on GitHub pages here.
Clone this repo to your local machine and run npm install
.
npm run dev
will spin up the dev server at localhost:3000
.
npm run build
will create a production build. Files are placed in the below folder.
./src/client/public