We are in the beginning stages of a site and so there is very little custom code introduced at this point. I've noticed that images are not being resized properly.
I originally thought the hash was not being applied properly, but that turned out to not be the case. I've tested this in two ways:
- Disabled Media Request Protection
- Altered a generated URL
After disabling Media Request Protection, I assumed I could simply alter an image by appending h or w to the query string as such:
However, the image is not resized.
When I leave Media Request Protection turned on and modify a URL, e.g.:
http://URL/-/media/Home-Page/images/careers-icon.ashx?h=200&mh=10&mw=175&w=175&hash=BAB30E6E5E518F898DFE7D3C726658814B46BA46
I receive the proper log message:
6720 12:46:46 ERROR MediaRequestProtection: An invalid/missing hash value was encountered. The expected hash value: AE578A561DA323EEC4F7324CB154DBB9BA6B8924. Media URL: /-/media/Home-Page/images/careers-icon.ashx?h=200&mh=10&mw=175&w=175&hash=BAB30E6E5E518F898DFE7D3C726658814B46BA46, Referring URL: (empty)
As you can see, I've also tried setting the max width and max height attributes as well, to no avail. Is this a known bug in our Sitecore version? As stated, this is a pretty vanilla install at this point.
@RenderImage(Model, x => x.Image, isEditable: true)
in all cases