MCPcopy Create free account
hub / github.com/dailydotdev/apps / preloadImage

Function preloadImage

packages/shared/src/hooks/useImagePreloader.ts:3–6  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

1import { useEffect } from 'react';
2
3const preloadImage = (url: string) => {
4 const img = new Image();
5 img.src = url;
6};
7
8/**
9 * Preloads images in the background during browser idle time.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected