public function buildView(FormView $view, FormInterface $form, array $options)
    {
        $parentData = $form->getParent()->getData();
        if ($parentData !== null) {
            $accessor = PropertyAccess::getPropertyAccessor();

            // set an "image_url" variable that will be available when rendering this field
            $url = $accessor->getValue($parentData, $options['image_path']);
            if ($url !== null) {
                $view->vars['image_url'] = $url;
            }
        }

        if (empty($view->vars['image_url']) && $options['no_image_placeholder'] !== null) {
            $view->vars['image_url'] = $options['no_image_placeholder'];
        }

        $view->vars['gaufrette'] = $options['gaufrette'];
        $view->vars['image_alt'] = $options['image_alt'];
        $view->vars['image_width'] = $options['image_width'];
        $view->vars['image_height'] = $options['image_height'];
    }