I’m using symfony to develop a website and have it mostly functioning, but I need it to resize images to a certain size when they are uploaded. I installed the sfImageTransfomPlugin to allow me to resize them, and figured out that I need to overload the save() method in the model class, but I can’t find any documentation to get the information about the uploaded image so that I can resize it. Has anyone done this before or can point me to some documentation for it?
Thanks in advance.
Resizing images in model is not a good practice, imho.
The plugin’s documentation already tells about simple implementation:
Assuming you bind submitted values via
bindmethod:Name of uploaded file you can get from your form object: