// Original site images, hosted from the owner's WordPress export.
const mods = import.meta.glob<{ default: { url: string } }>("../assets/wp/*.asset.json", {
  eager: true,
});

export function img(name: string): string {
  const m = mods[`../assets/wp/${name}.asset.json`];
  if (!m) throw new Error(`Missing asset ${name}`);
  // Lovable's /__l5e/assets-v1 URLs are only served by its preview host.
  // Keep the original binary in public so the standalone deployment can serve it.
  return `/media/eniac/${encodeURIComponent(name)}`;
}
