def get_diskimage(client, name_or_id):
    """Load a disk image by name or ID."""
    if name_or_id.isdigit():
        return client.get_diskimage(name_or_id)
    images = client.get_diskimages({'name': name_or_id})
    if not images:
        return
    return client.reload(images[0])