make better use of images.py