This is a simple aspnet middlewear inspired by a rack middlewear, that converts your small images to base64 encoded data tags in html.
I wouldn't actually recommend doing this, I mostly did this to see what is possible in aspnet core middlwear. There is much evidence to suggest that it is a bad idea
How to use:
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
app.UseEmbedImages(env);
}
Before
<img src="/path/to/img.jpg" />
After
<img src="data:img/jpeg;base64,=randomdatahere" />
Description
Languages
HTML
65.5%
C#
30.3%
CSS
2.7%
JavaScript
1.5%