Search Results for

    Show / Hide Table of Contents
    View Source

    Class ImageUrlGeneratorController

    The API controller used for getting URLs for images with parameters

    Inheritance
    System.Object
    Microsoft.AspNetCore.Mvc.ControllerBase
    UmbracoApiControllerBase
    UmbracoApiController
    UmbracoAuthorizedApiController
    UmbracoAuthorizedJsonController
    Namespace: Umbraco.Cms.Web.BackOffice.Controllers
    Assembly: Umbraco.Web.BackOffice.dll
    Syntax
    public class ImageUrlGeneratorController : UmbracoAuthorizedJsonController
    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 Source

    ImageUrlGeneratorController(IImageUrlGenerator)

    Declaration
    public ImageUrlGeneratorController(IImageUrlGenerator imageUrlGenerator)
    Parameters
    Type Name Description
    IImageUrlGenerator imageUrlGenerator

    Methods

    View Source

    GetCropUrl(String, Nullable<Int32>, Nullable<Int32>, Nullable<ImageCropMode>)

    Declaration
    public string GetCropUrl(string mediaPath, int? width = null, int? height = null, ImageCropMode? imageCropMode = null)
    Parameters
    Type Name Description
    System.String mediaPath
    System.Nullable<System.Int32> width
    System.Nullable<System.Int32> height
    System.Nullable<ImageCropMode> imageCropMode
    Returns
    Type Description
    System.String
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • ImageUrlGeneratorController(IImageUrlGenerator)
    • Methods
      • GetCropUrl(String, Nullable<Int32>, Nullable<Int32>, Nullable<ImageCropMode>)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX