create-yew-app icon indicating copy to clipboard operation
create-yew-app copied to clipboard

How to let parcel load image referenced from inside .rs

Open wtho opened this issue 4 years ago • 1 comments

Hey! Thanks for this starter!

I reference my image in html! { <img src="logo.png"></img> }, but parcel does not load it. Is there some way to do so? Is this the right place to ask this?

wtho avatar Mar 19 '20 00:03 wtho

My current workaround is:

  • build app once and check hash of image
  • reference image with hash in rust html:
    html! { <img src="logo.b1252105.png"></img> }

wtho avatar Apr 19 '20 16:04 wtho

2 years later, is still missing the way of create a "resources" folder, so i just convert the image to base64, and later set the: html!{<img src="base64codehere"/>}

Nojipiz avatar Sep 30 '22 15:09 Nojipiz

upgrade to use trunk, npx [email protected] my-app

jetli avatar Jul 16 '23 22:07 jetli