/**
* This will remove the old image and if needed the generated thumbnails
*/
protected function removeOldFile()
{
if (static::GENERATE_THUMBNAILS && is_dir($this->getUploadRootDir())) {
Model::deleteThumbnails($this->getUploadRootDir(), $this->oldFileName);
return;
}
parent::removeOldFile();
}