Add VichUploaderBundle by running this command from the terminal at the root of your Symfony project:
composer require vich/uploader-bundle
Alternatively, you can add the requirement "vich/uploader-bundle": "^1.8"
to your composer.json and run composer update vich/uploader-bundle
.
This could be useful when the installation of VichUploaderBundle is not compatible with some currently installed dependencies. Anyway, the previous option is the preferred way, since composer can pick the best requirement constraint for you.