Issue with CapacitorJS loading images from JavaScript file.
I encountered a problem with my CapacitorJS project where images were not loading when called inside the JavaScript file. In one example, the image file did not show up, but in another example it worked fine. Even adding the image HTML tag directly inside index.html displayed the image. I tried changing the path to "./img/logo.png" and even creating an "img" folder inside the public folder, but it kept getting deleted whenever I ran "npm run build". (I am aware that using CSS could be a solution for this issue).
EXAMPLE 1: (not working)
document.getElementById('root').innerHTML = `<img id="logo_apps" style="width:110px;" src="img/logo.png" />`;
EXAMPLE 2: (working)
document.getElementById('root').innerHTML = `<img id="logo_apps" style="width:110px;" src="https://google.com/img/logo.png" />`;