Open dpw1 opened 1 year ago
Did some soul searching and came up with this.
import icon from '../../../assets/test.jpg';
const container = document.createElement("div")
container.className = "charlie";
container.style.backgroundImage = `url('${chrome.runtime.getURL(icon)}')`;
But running into the issue with web_accessible_resources
Fixed the web_accessible_resource issue by updating the manifest.json file. https://github.com/GoogleChrome/developer.chrome.com/issues/544#issuecomment-806260538
Hello,
Firstly thank you very much for the excellent work! Is there anyway I can import images into my
content
script? I have tried it like this:import logo from '../../../assets/img/icon-128.png';
But it doesn't work. Any help is greatly appreciated. Thanks!