648 B
648 B
This is a simple aspnet 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" />