ImageTagHelper Class

ImageTagHelper Class

Renders the image source url for image content.

[HtmlTargetElement("img", Attributes = "re-src")]
public class ImageTagHelper: TagHelper

Inheritance  TagHelper ImageTagHelper

Constructors

Name Description
ImageTagHelper(IRedaktContext, ILogger<ImageTagHelper>)

Properties

Name Description
BackgroundColor Gets or sets the background color when using ResizeMode.Pad. Must be a hexadecimal RGB color value, with or without hash (#).
Height Gets or sets the image height to be used for server-side resizing.
Mode Gets or sets the server-side resize mode.
Source Gets or sets the source image object. must be a FileDescriptor object or an instance of a content model.
Width Gets or sets the image width to be used for server-side resizing.

Methods

Name Description
ProcessAsync(TagHelperContext, TagHelperOutput)