'fs.files'); //Overriding save to do the thumbnailing :) public function save($entity, $data, array $options = array()) { //Create a new imagemagick object from the uploaded file $im = new Imagick($data['file']); //Create a thumbnail of the file, then store it in the "thumbnail" object $data['thumbnail'] = $im->thumbnailImage(200, null); //Pass the changes off to the original save method. return parent::save($entity, $data, $options); } } ?>