Hello, for some reason, when trying to insert an image into my application, nothing works. I am using React Three Fiber / Drei. I have tried uploading an image in an tag as well as using . What other ways are there to bring an image into the scene besides texturing?
P.S. I posted images in different directories, including public, but all to no avail
that’s not related to three, react or drei, generally every resource needs to be in the public folder, given /public/foo.png
the url then becomes /foo.png
and if you have routes ./foo.png
. you can’t have resources within /src and refer to them with a relative url.
here’s an example with images on a mesh
you can also use dreis <Image>
component btw which takes care of css:cover and aspect ratio, but the image itself has to be in public likewise