def get_image_json(image):
    preview_image = image.get_rendition('max-165x165')

    return json.dumps({
        'id': image.id,
        'edit_link': reverse('wagtailimages:edit', args=(image.id,)),
        'title': image.title,
        'preview': {
            'url': preview_image.url,
            'width': preview_image.width,
            'height': preview_image.height,
        }
    })
Returns an iterator that will return each available subdomain for the
dataset/ETHPy150Open torchbox/wagtail/wagtail/wagtailimages/views/chooser.py/get_image_json--crossover with--dataset/ETHPy150Open rackspace/pyrax/pyrax/clouddns.py/CloudDNSClient.get_subdomain_iterator