protected function beforeDelete() { foreach ($this->imageSizes as $size) { $thisPath = $this->getImageURIPath($size); if (file_exists($thisPath)) { unlink($thisPath); } } return parent::beforeDelete(); }