import { converse } from "@converse/headless/converse-core"; import { directive, html } from "lit-html"; export const renderImage = directive((url, onLoad, onClick) => part => { function onError () { part.setValue(converse.env.utils.convertUrlToHyperlink(url)); part.commit(); } part.setValue( html`` ); });