Maybe you mean that your script has 30 lines, and you want to know if there is a way to reduce it to two lines?
If that's the case, I don't think so. It's about two lines per image, and as far as I know you have to write it for every image:
if (document.images)
{
pic1= new Image()
pic1.src="//someplace.com/image1.gif"
pic2= new Image()
pic2.src="//someplace.com/image2.gif"
pic3= new Image()
pic3.src="//someplace.com/image3.gif"
(and so on for every image)
}
BTW: you could do without the IF statement. It's there for older browsers that don't support the image object. If you leave it out, older browsers will get a javascript error.
[Message Edited]