simplify pattern matching when searching for image to use