In the mobile site, we have various icons that we would like to load without needing JavaScript. When loaded as data uris these bloat the size of the render blocking stylesheet (on mobile this is currently 8kb)
It could be possible in a module definition using the ResourceLoaderImage module to request data uris are not used. This gives full control to the engineer in how their styles are loaded.
On mobile, this would reduce the size of the render blocking CSS by 1.6kb after gzipping.
It appears, ResourceLoaderImage module can already handle shipping assets as URIs so the proposed change would be quite simple: a flag in ResourceLoader that allows the module to opt in.
Data-uris are usually preferable.. so this would remain the default.
Related: