Download tools/ui/src/lib/utils/image-error-fallback.ts from Parakon/parakon-runtime: direct link, hf CLI and curl.
- Browser
- Download file 388 Bytes
-
https://huggingface.co/Parakon/parakon-runtime/resolve/main/tools/ui/src/lib/utils/image-error-fallback.ts
- Command line
-
hf download hf://Parakon/parakon-runtime/tools/ui/src/lib/utils/image-error-fallback.ts
-
curl -L -o image-error-fallback.ts https://huggingface.co/Parakon/parakon-runtime/resolve/main/tools/ui/src/lib/utils/image-error-fallback.ts
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>`; | |
| } | |