G
G
grabbee2017-02-08 22:56:07
symfony
grabbee, 2017-02-08 22:56:07

How to compress an image right after upload?

The image is uploaded via vich_uploader but the image is not processed by this bundle. For compression, liip_imagine is recommended . How to properly compress the original immediately after downloading and save the already compressed image instead of saving the original?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis, 2017-02-09
@grabbee

Attach a listener to the \Vich\UploaderBundle\Event\Events::POST_UPLOAD event, in which to actually compress the image.
https://github.com/dustin10/VichUploaderBundle/blo...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question