Renders a background image css style on the element.

[HtmlTargetElement]
public class BackgroundImageTagHelper
Inheritance:
ObjectTagHelperBackgroundImageTagHelper

Constructors

BackgroundImageTagHelper(IRedaktContext, ILogger<ImageTagHelper>)

Properties

Width Gets or sets the image width to be used for server-side resizing.
Width1x Gets or sets the reference image width for 1x resolution that other resolutions will be based on. If not provided, the regular image width will be used.
Height Gets or sets the image height to be used for server-side resizing.
Mode Gets or sets the server-side resize mode.
BackgroundColor Gets or sets the background color when using ResizeMode.Pad. Must be a hexadecimal RGB color value, with or without hash (#).
Quality
Format
Source Gets or sets the source image object. Must be a FileDescriptor object or an instance of a content model.
ImageSet Gets or sets the image source set widths (comma separated integer values). Source set images will preserve the aspect ratio if width and height are both specified.

Methods

Process(TagHelperContext, TagHelperOutput)