parakon-runtime / tools /ui /src /lib /utils /image-error-fallback.ts
kat0012's picture
Parakon runtime: llama.cpp fork with fused 1-bit CUDA/Metal/CPU kernels (part 8)
b7b13c6 verified
Raw History Blame Contribute Delete
388 Bytes
/**
* Simplified HTML fallback for external images that fail to load.
* Displays a centered message with a link to open the image in a new tab.
*/
export function getImageErrorFallbackHtml(src: string): string {
return `<div class="image-error-content">
<span>Image cannot be displayed</span>
<a href="${src}" target="_blank" rel="noopener noreferrer">(open link)</a>
</div>`;
}