refactor to allow room for file matching
link to dbimages from image_id