updated image migration script