chestnut icon indicating copy to clipboard operation
chestnut copied to clipboard

Cannot use resources folder in cljs.

Open zendevil opened this issue 5 years ago • 3 comments

I have an app created using Chestnut, and there's an image in the project in the location: resources/public/img.png. I want to use this image in my app, but doing [:img {:src "public/img.png"}] or [:img {:src "./img.png"}] doesn't work. What's the correct src for the image in the resources folder?

zendevil avatar Mar 19 '20 19:03 zendevil

Should be accessible by /img.png - the public folder is considered a resources folder, hosted from the root of your app.

featheredtoast avatar Mar 19 '20 19:03 featheredtoast

[:img {:src "/img.png"}] doesn't work for me. How can I debug this?

zendevil avatar Mar 20 '20 00:03 zendevil

It's working for me, under the default (reagent) setup... What react wrapper are you using?

Can you confirm that you can access the image at localhost:10555/img.png?

featheredtoast avatar Mar 29 '20 21:03 featheredtoast