Class ImageUrlGeneratorController
- Namespace
- Umbraco.Cms.Web.BackOffice.Controllers
- Assembly
- Umbraco.Web.BackOffice.dll
The API controller used for getting URLs for images with parameters
public class ImageUrlGeneratorController : UmbracoAuthorizedJsonController
- Inheritance
-
ImageUrlGeneratorController
- Inherited Members
Remarks
This controller allows for retrieving URLs for processed images, such as resized, cropped, or otherwise altered. These can be different based on the IImageUrlGenerator implementation in use, and so the BackOffice could should not rely on hard-coded string building to generate correct URLs
Constructors
ImageUrlGeneratorController(IImageUrlGenerator)
public ImageUrlGeneratorController(IImageUrlGenerator imageUrlGenerator)
Parameters
imageUrlGeneratorIImageUrlGenerator
Methods
GetCropUrl(string, int?, int?, ImageCropMode?)
public string? GetCropUrl(string mediaPath, int? width = null, int? height = null, ImageCropMode? imageCropMode = null)