block: helper function, to find the base image of a chain