MCPcopy Create free account
hub / github.com/Alphanimble/htmlstream / picsumFallback

Function picsumFallback

demo/chat/stream-actions.ts:32–35  ·  view source on GitHub ↗
(seed: string, width = 140, height = 140)

Source from the content-addressed store, hash-verified

30}
31
32function picsumFallback(seed: string, width = 140, height = 140): string {
33 const safe = seed.replace(/[^a-z0-9_-]/gi, "-").slice(0, 40) || "cat";
34 return `https://picsum.photos/seed/${encodeURIComponent(safe)}/${width}/${height}`;
35}
36
37function fixBrokenImages(root: HTMLElement): void {
38 root.querySelectorAll<HTMLImageElement>("img").forEach((img) => {

Callers 1

fixBrokenImagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected