No, it doesn’t work the same as a static site. You have to import the images and add them using JS.
Edit: It works if the images are in the public folder.
What about Replit does it work for you? They also have normal static templates and allow image uploads.
Otherwise, I would suggest you use an image host instead if you need to use Stackblitz with its static templates. You can use GitHub for image hosting as well.