PrestaImageBundle icon indicating copy to clipboard operation
PrestaImageBundle copied to clipboard

Can't use my own image_uri with download_uri

Open yvanngn opened this issue 2 years ago • 1 comments

Hi,

Thanks for the bundle, it works well. It would be nice to be able to overwrite the dowload_uri option with my own because it depends on the bool dowload_link and is forced to the location of the image

if ($options['download_link'] && $form->getParent()->getData()) {
    $view->vars['download_uri'] = $this->storage->resolveUri($form->getParent()->getData(), $form->getName());
}

(https://github.com/prestaconcept/PrestaImageBundle/blob/4a297ff656ed3be980f94e0fb0bf3709ecd45c06/src/Form/Type/ImageType.php#L104-L106)

The dowload_link seems not necessary too. Maybe we can add another option image_uri to overwrite the location and let the dowload_uri because they are two differents options to have a behavior close to VichImage.

Thank you

yvanngn avatar Oct 26 '23 08:10 yvanngn

Hi @yvanngn

If I'm right everything is good here. Can I close the issue?

J-Ben87 avatar Jan 04 '24 13:01 J-Ben87