Sunday, 15 June 2014

javascript - How can I get a list of all the images currently in use on a website? -



javascript - How can I get a list of all the images currently in use on a website? -

my client wants images published on website watermarked. however, published images (around 100 of them) located in same directory obsolete images (~4000 of them), generic names img00415.jpg. i've got photoshop script automatically watermarks images, doing 4000 of them occupy re-create of photoshop god knows how long, , need other things.

there no way of distinguishing between images published or not published other physically seeing them on site or in source code (it's static html site 2002). how can list of image resources in use?

this homecoming image sources (on page) in array:

class="lang-js prettyprint-override">var images = document.getelementsbytagname('img'); var srclist = []; for(var = 0; < images.length; i++) { srclist.push(images[i].src); }

put on top of main layout page , run on every page

javascript html jpeg

No comments:

Post a Comment