Skip to content

cornelha/ImageResizer.AspNetCore

 
 

Repository files navigation

ImageResizer.AspNetCore

Development

Build status NuGet GitHub issues GitHub stars GitHub license

You can see the DEMO here: Demo

Before posting new issues: Test samples

Current version: 1.9.x [Stable] and 2.0.x-beta[UnderDevelopment]

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

Overview

it's for DotNetCore only

aspnetcore 2.0 +

Easy to install

Use the library as dll, reference from nuget or use this in package manager console

Install-Package ImageResizer.AspNetCore

Wiki

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" />

About

ImageResizer.AspNetCore is the image server for ASP.NET CORE, do anything with your images in realtime :)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages

  • C# 54.2%
  • HTML 45.8%