i would create a table with an image id number and the image name
1 picture1
2 picture2
3 picture3
Of course you would have a folder on your server with all the images with those names like:
/images/picture1.gif
/images/picture2.gif
Then call your images for each page like
<img src = /images/$picture>
where $picture would equal
picture1.gif, you would use an array to assign the numbers to the pictures
hope that helped