I think I had this up here before.
#/bin/sh
if [ $1 == "" ]; then
exit
else
DUMPDIR="$1"
shift
fi
wget --limit-rate=150k -erobots=off --span-hosts -w 2 -N -nd -P ${DUMPDIR}/ -U Mozilla/5.0 -r -l 1 -A.jpg,.png -I "/*/src" $* #For all the images in a thread
#wget -U "Mozilla/5.0" -erobots=off --span-hosts -w 2 -nc -nd -P ${DUMPDIR}/ -U Mozilla/5.0 -r -l 2 -A.jpg,.png -I "/*/src","/*/res" $* #Uncomment this line for all images in a page of a board.