This prevents bad actors from manipulating processing parameters and DOS your site by requesting a large amount of slightly different image URLs that all need to process the image (a potentially CPU and memory expensive process). These processed images are then also saved to the ImageSharp cache (stored in umbraco\Data\TEMP\MediaCache by default), which doesn't have a built-in way to clean up old/infrequently used files and could therefore fill up your disk.
Usage:
You know GetCropUrl() build in i Umbraco. Well after installing this package you need to use GetHmacUrl() i can the same as Umbraco but i generate a key to prevents bad actors.
If you trying to use GetCropUrl() or simple Url() + "?width=400" the image wil get an statuscode 400.
appsettings
"MediaProtection": {
"Secret": "...",
"HmacHashMode": "Hmac512"
}
The HmacHasMode is default Hmac256. But you can also config it to Hmac384 or Hmac512.
The Secrect, is an string witch is required.