Class ImageUrlGeneratorController
The API controller used for getting URLs for images with parameters
Inheritance
System.Object
Namespace: Umbraco.Web.Editors
Assembly: Umbraco.Web.dll
Syntax
public class ImageUrlGeneratorController : UmbracoAuthorizedJsonController, IDiscoverable
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
View SourceImageUrlGeneratorController(IImageUrlGenerator)
Declaration
public ImageUrlGeneratorController(IImageUrlGenerator imageUrlGenerator)
Parameters
Type | Name | Description |
---|---|---|
IImageUrlGenerator | imageUrlGenerator |
Methods
View SourceGetCropUrl(String, Nullable<Int32>, Nullable<Int32>, Nullable<ImageCropMode>, String)
Declaration
public string GetCropUrl(string mediaPath, int? width = null, int? height = null, ImageCropMode? imageCropMode = null, string animationProcessMode = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | mediaPath | |
System.Nullable<System.Int32> | width | |
System.Nullable<System.Int32> | height | |
System.Nullable<ImageCropMode> | imageCropMode | |
System.String | animationProcessMode |
Returns
Type | Description |
---|---|
System.String |