Class ImagesController
A controller used to return images for media
Inheritance
System.Object
Namespace: Umbraco.Web.Editors
Assembly: Umbraco.Web.dll
Syntax
[PluginController("UmbracoApi")]
public class ImagesController : UmbracoAuthorizedApiController, IDiscoverable
Constructors
View SourceImagesController(IMediaFileSystem, IContentSection)
Declaration
[Obsolete("This constructor will be removed in a future release. Please use the constructor with the IImageUrlGenerator overload")]
public ImagesController(IMediaFileSystem mediaFileSystem, IContentSection contentSection)
Parameters
Type | Name | Description |
---|---|---|
IMediaFileSystem | mediaFileSystem | |
IContentSection | contentSection |
ImagesController(IMediaFileSystem, IContentSection, IImageUrlGenerator)
Declaration
public ImagesController(IMediaFileSystem mediaFileSystem, IContentSection contentSection, IImageUrlGenerator imageUrlGenerator)
Parameters
Type | Name | Description |
---|---|---|
IMediaFileSystem | mediaFileSystem | |
IContentSection | contentSection | |
IImageUrlGenerator | imageUrlGenerator |
Methods
View SourceGetBigThumbnail(String)
Gets the big thumbnail image for the original image path
Declaration
public HttpResponseMessage GetBigThumbnail(string originalImagePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | originalImagePath |
Returns
Type | Description |
---|---|
HttpResponseMessage |
Remarks
If there is no original image is found then this will return not found.
GetResized(String, Int32)
Gets a resized image for the image at the given path
Declaration
public HttpResponseMessage GetResized(string imagePath, int width)
Parameters
Type | Name | Description |
---|---|---|
System.String | imagePath | |
System.Int32 | width |
Returns
Type | Description |
---|---|
HttpResponseMessage |
Remarks
If there is no media, image property or image file is found then this will return not found.