You can see the DEMO here: Demo
Before posting new issues: Test samples
In this version: all main functionality working except for disk cache and watermark which will be added soon the watermark as a text just added but need some bug fix
aspnetcore 2.0 +
Use the library as dll, reference from nuget or use this in package manager console
Install-Package ImageResizer.AspNetCore
for using this awesome library, you only need to add two things
first: add this line of code to your Startup.cs
public void ConfigureServices(IServiceCollection services)
{
//...
services.AddImageResizer();
//...
}
Then this one :
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
//...
app.UseStaticFiles();
app.UseImageResizer();
//...
}
and you can use it in your client-side(html,css,ts,...) just like below:
Simple Is That Enjoy :))
<img src="~/images/mardinCity.jpg?w=200" />
<img src="~/images/mardinCity.jpg?h=300" />
<img src="~/images/mardinCity.jpg?format=png" />
<img src="~/images/mardinCity.jpg?format=jpg" />
<img src="~/images/mardinCity.jpg?format=jpeg" />
<img src="~/images/mardinCity.jpg?w=100&h=200&mode=pad" />
<img src="~/images/mardinCity.jpg?w=100&h=200&mode=max" />
<img src="~/images/mardinCity.jpg?w=100&h=200&mode=crop" />
<img src="~/images/mardinCity.jpg?w=100&h=200&mode=stretch" />
<img src="~/images/mardinCity.jpg?autorotate=true" />
<img src="~/images/mardinCity.jpg?autorotate=false" />
<img src="~/images/mardinCity.jpg?quality=5" />
<img src="~/images/mardinCity.jpg?w=400&quality=80" />