Query string image resize not working on umbraco 12
Hi! On Umbraco 12 I'm running into an issue resizing images with query strings. In previous versions of Umbraco I could resize an image in a razor template like so:
Which would then produce a version of the image with a width of 400px. However, in Umbraco 12 this query string only seems to work sporadically, and more often than not returns an image unchanged. See an example below:
We tried upgrading to the latest version of 12 - 12.5.6. Still the same issue.
Thanks for posting this - after a few hours of searching I found this and it solved my issue.
I think my issue stemmed from creating a new .net core solution in Visual Studio and then adding Umbraco 13 to it vs creating it as an Umbraco 13 solution right from the start.
The difference in the Program.cs file between the two install paths is this line only (for URL re-writing).
I searched for "Umbraco 13 ImageSharp.Web not working" , "Umbraco 13 Image Cropping not working" etc, with not much being returned.
Hopefully all my keyword stuffing above will help others find your solution!
Query string image resize not working on umbraco 12
Hi! On Umbraco 12 I'm running into an issue resizing images with query strings. In previous versions of Umbraco I could resize an image in a razor template like so:
Which would then produce a version of the image with a width of 400px. However, in Umbraco 12 this query string only seems to work sporadically, and more often than not returns an image unchanged. See an example below:
We tried upgrading to the latest version of 12 - 12.5.6. Still the same issue.
Found a solution at link below that worked for me.
https://our.umbraco.com/forum/using-umbraco-and-getting-started/109573-getcropurl-doesnt-resize-the-image-on-umbraco-10#comment-341339
In Startup.cs if you either remove this line (OR change):
to:
and rebuild solutuion. Works like a charm!
Thanks for posting this - after a few hours of searching I found this and it solved my issue.
I think my issue stemmed from creating a new .net core solution in Visual Studio and then adding Umbraco 13 to it vs creating it as an Umbraco 13 solution right from the start.
The difference in the Program.cs file between the two install paths is this line only (for URL re-writing).
I searched for "Umbraco 13 ImageSharp.Web not working" , "Umbraco 13 Image Cropping not working" etc, with not much being returned.
Hopefully all my keyword stuffing above will help others find your solution!
Thanks again.
is working on a reply...