

def url_generator(request, image_id):
    image = get_object_or_404(get_image_model(), id=image_id)
    if (not permission_policy.user_has_permission_for_instance(request.user, 'change', image)):
        return permission_denied(request)
    form = URLGeneratorForm(initial={
        'filter_method': 'original',
        'width': image.width,
        'height': image.height,
    })
    return render(request, 'wagtailimages/images/url_generator.html', {
        'image': image,
        'form': form,
    })

dataset/ETHPy150Open torchbox/wagtail/wagtail/wagtailimages/views/images.py url_generator/original