This is the code for the blog post:
"Progressive CSS rendering with or without data URLs"
You can play with it by looking at the various yarn run ...
scripts
in the package.json
.
- https://www.peterbe.com/render-block-images-in-css/inlined.html - just inlined critical CSS
- https://www.peterbe.com/render-block-images-in-css/inlined-datauri.html - same but image URLs in CSS turned into data URLs
- https://www.peterbe.com/render-block-images-in-css/index.html - baseline before any optimization