There are couple of ways to load image src urls using javascript, like using document.images or by selecting all img tags and get srcs.
However I can't figure out a way to image urls used within css.
For example, if the webpage has following css code, it loads bg.png, but I can't get that url using methods I mentioned above.
.bg {
background-image: url('bg.png');
}
Anyone has an idea how to get all these urls used within css?
document.styleSheetssearch the rules in each sheet?getComputedStyle. Will it help you? - stackoverflow.com/questions/2104149/…forEach()method or theforloop + the method to which I gave you the link.