Renders an image <img> tag with specified attributes and returns HTML.
Class: YetaWF.Modules.ComponentsHTML.Components.ImageComponentBase
Namespace: YetaWF.Modules.ComponentsHTML.Components
Assembly: YetaWF.ComponentsHTML
public static string RenderImage( string imageType, int width, int height, string? model, string? CacheBuster = null, string? Alt = null, bool ExternalUrl = false, YetaWF.Core.Pages.PageDefinition.PageSecurityType SecurityType = YetaWF.Core.Pages.PageDefinition.PageSecurityType.Any );
imageType
The image type which must match a registered image handler. The YetaWF.Core.Image.ImageSupport.AddHandler method is used to register an image handler.
width
The width of the image. Both width and height may be 0, in which case no size attributes are rendered.
height
The height of the image. Both width and height may be 0, in which case no size attributes are rendered.
model
The model representing the image.
CacheBuster
A value that becomes part of the image URL, which can be used to defeat client-side caching. May be null.
Alt
The text that is rendered as part of the <img> tag's Alt attribute. May be null in which case the text "Image" is used.
ExternalUrl
Defines whether a full URL including domain is rendered (true) or whether just the path is used (false).
SecurityType
The security type of the rendered image URL.
See Also YetaWF.Modules.ComponentsHTML.Components.ImageComponentBase ClassYetaWF.ComponentsHTML PackageYetaWF.Core
Documentation Feedback
© 2024 - Softel vdm, Inc. - YetaWF.com