Pull image check logic into a separate PR.