Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Hrvoje Hudoletnjak 5 posts 95 karma points
    Oct 17, 2023 @ 08:38
    Hrvoje Hudoletnjak
    0

    Image resize with query string and IIS problem

    In the process of upgrading my website to Umbraco 12. I used simple trick with query string to resize the image before, like photo.jpg?width=100, and worked fine, locally in dev, and deployed to IIS (Win Server 2019).

    Now with upgraded Umbraco 12 (8>10>12), locally it still resize (so using Kestrel & IIS Express), but after I deploy to IIS image is not resized but always displayed in the original size.

    Looks to me that IIS is maybe serving the image directly, so Umbraco (and ImageSharp, if thats used?) are not even getting those image requests? How to resize images properly in U12, and is there any special IIS setting i have to configure?

  • Hrvoje Hudoletnjak 5 posts 95 karma points
    Oct 23, 2023 @ 21:44
    Hrvoje Hudoletnjak
    100

    Ok, think i found what was the problem!

    I added "Media" as a Virtual Directory in IIS (for backups and some sharing...), and seems that Umbraco or ImageSharp, or even .NET Core doesn't know how to work properly with IIS Virtual Directories. Same thing works fine in .NET 4.8 and Umbraco 8.

Please Sign in or register to post replies

Write your reply to:

Draft