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 6 posts 96 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 6 posts 96 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.

  • Uma Adhikari 3 posts 73 karma points
    Jun 21, 2024 @ 15:16
    Uma Adhikari
    0

    I'm in the same boat. Did you figure out the workaround ?

  • Hrvoje Hudoletnjak 6 posts 96 karma points
    Jun 21, 2024 @ 19:52
    Hrvoje Hudoletnjak
    0

    Yeah, i mean no, I just don't use Virtual Directories any more.

Please Sign in or register to post replies

Write your reply to:

Draft