Images not resizing in v13, what am I missing?
# help-with-umbraco
b
Hey everyone, Just made my first Umbraco site live last night and noticed that the images aren't getting resized by ImageSharp. Everything I've read suggests this should happen automatically based on the
GetCropUrl()
parameters. I can see the parameters in the browses web request but a full size image is returned. For example, the url
/media/zjwn4khb/sabaj-k1-roto-lift-1.png?width=300&height=300&v=1da423f8e435080
is responding with a 1000x1000 unmodified image. I've also noticed that there's no
\umbraco\data\TEMP\MediaCache
folder getting created either. Any ideas?
Managed to resolve my issue, at some point
app.UseStaticFiles();
got added to my startup.cs file. After comparing files between a fresh install and my project I noticed the v13 template doesn't have that line. Removing it resolves the image resizing issue. Re-ordering it below
app.UseUmbraco()
also seems to resolve the issue as well for those that need it.
s
Yeah you have to be careful with that one: https://github.com/umbraco/Umbraco-CMS/issues/12666
b
Yeah, to be clear for anyone finding this, the GitHub issue mentions that Umbraco already adds the StaticFile middleware so no need to call it yourself. You can use StaicFileOptions and DI to customise behaviour.
21 Views