I recently saw traced SVG image loading in gatsby.js


Is there any way in which i can implement this in create-react-app, with automation. Right now, I use create-react-app and cloudinary. I store the url in my database, I couldn't find a good resource through which I can make this happen. Help would be appreciated.

1 Answers

Fernando Montoya On

If you read the post and what it uses, you find that it uses https://github.com/lovell/sharp, which accepts an image as parameter, in your case you can download the image, apply the filter and finally use the most important part of this technique:

        backgroundImage: `url("${realUrl}"), url("${

Then the browser will do the dynamic load for you.