adding function to lookup image ids