Skip to content

simpleway2016/ImageToWebp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

当用户访问.png .jpg文件时,根据客户浏览器对webp格式的支持程度,自动压缩为webp图片,响应给用户, 不支持webp的用户,将以传统图片压缩方式压缩图片,响应给用户

        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            //这句代码要放在Configure方法体的最上面
            ImageToWebp.Factory.Enable(app, env);

            app.Run(async (context) =>
            {
                await context.Response.WriteAsync("Hello World!");
            });

            
        }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published