#Received unsupported format undefined from undefined. Currently only jpeg, jpg, png, tiff, webp, gif
1 messages · Page 1 of 1 (latest)
right now you're passing a Promise, which the Image component recognize as an object, so it tries to read the format of it which ends up not existing
const games = [
{
url: await import('../assets/games/game-1.png'),
label: 'party',
},
];
Right? It doesn't work.
Hmm, that should work, what happens if you console.log(games[0].url)?
oh yeah, you're not getting the default export, derp
you need to add .default either after game.url or in the imports
Yes, thank you very much. It worked
best support in the world xD
I'll make it so <Image> supported a not-awaited import
it'll make it easier to use in some cases
Hi. Can you tell me how to make a simple import directly in html, without declaration? for example - <Image src={await import('../assets/games/game-hellhost.png')} alt="777" format="webp" />
im getting an error The type "Promise<typeof import("*.png")>" cannot be assigned to the type "string | ImageMetadata".