Skip to content

Commit bd322d2

Browse files
authored
Note that you've got to call UseImageSharp before UseStaticFiles.
Looks like ImageSharp.Web only processes images if `app.UseImageSharp();` is called before `app.UseStaticFiles();`, so added a comment to the docs to make this clear.
1 parent e0d7f75 commit bd322d2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

articles/imagesharp.web/gettingstarted.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ public void ConfigureServices(IServiceCollection services) {
1717

1818
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) {
1919

20-
// Add the image processing middleware.
20+
// Add the image processing middleware. Make sure this appears BEFORE app.UseStaticFiles(),
21+
// otherwise images will be served by ASP.NET's static file middleware before ImageSharp can process them.
2122
app.UseImageSharp();
23+
24+
app.UseStaticFiles();
2225
}
2326
```
2427

0 commit comments

Comments
 (0)