Allow for lazy loading images in markdown (#16746)

This commit is contained in:
Joakim Sørensen
2023-06-05 09:46:38 +02:00
committed by GitHub
parent 71954f545c
commit 31a3fa02d9
4 changed files with 15 additions and 1 deletions

View File

@@ -15,6 +15,9 @@ export class HaMarkdown extends LitElement {
@property({ type: Boolean }) public breaks = false;
@property({ type: Boolean, attribute: "lazy-images" }) public lazyImages =
false;
protected render() {
if (!this.content) {
return nothing;
@@ -24,6 +27,7 @@ export class HaMarkdown extends LitElement {
.content=${this.content}
.allowSvg=${this.allowSvg}
.breaks=${this.breaks}
.lazyImages=${this.lazyImages}
></ha-markdown-element>`;
}