ImageSharp.Web

High performance ASP.NET Core image processing middleware.

Blazingly fast straight out of the box

Built using the combined power of ASP.NET Core and ImageSharp, ImageSharp.Web can be installed within minutes and is capable of intelligently processing thousands of requests per second.

PM > Install-Package SixLabors.ImageSharp.Web
public void ConfigureServices(IServiceCollection services)
{
    services.AddImageSharp();
}

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
    app.UseImageSharp();
}
          

Sheer elegance in its simplicity

Processing commands are powerful yet simple and predictable. Serve optimized images with a only a few keystrokes.

// Resize
{PATH_TO_YOUR_IMAGE}?width=300
{PATH_TO_YOUR_IMAGE}?width=300&height=120&rxy=30,30
{PATH_TO_YOUR_IMAGE}?width=50&height=50&rsampler=nearest&rmode=stretch

// Format
{PATH_TO_YOUR_IMAGE}?format=jpg
{PATH_TO_YOUR_IMAGE}?format=gif
{PATH_TO_YOUR_IMAGE}?format=png
{PATH_TO_YOUR_IMAGE}?format=bmp
{PATH_TO_YOUR_IMAGE}?format=tga

Designed for any environment

Our dependency injection based architecture allows you to easily swap out components to suit your business needs.

PM > SixLabors.ImageSharp.Web.Providers.Azure
public void ConfigureServices(IServiceCollection services)
{
    services.AddImageSharp()
            .Configure<AzureBlobStorageCacheOptions>(options =>
            {
                options.ConnectionString = {AZURE_CONNECTION_STRING};
                options.ContainerName = {AZURE_CONTAINER_NAME};

                // Optionally create the cache container on startup if not already created.
                AzureBlobStorageCache.CreateIfNotExists(options, PublicAccessType.None);
            })
            .SetCache();
}