prestaconcept / PrestaImageBundle

Allow to crop local and remote image before uploading them through a classic form.
MIT License
23 stars 19 forks source link

Can't use my own image_uri with download_uri #96

Open yvanngn opened 11 months ago

yvanngn commented 11 months ago

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

J-Ben87 commented 8 months ago

Hi @yvanngn

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