public function clearThumbnails($force = false)
{
if ($this->_dataChanged || $force) {
// video thumbnails and image previews
$files = glob(PIMCORE_TEMPORARY_DIRECTORY . "/document-image-cache/document_" . $this->getId() . "__*");
if (is_array($files)) {
foreach ($files as $file) {
unlink($file);
}
}
recursiveDelete($this->getImageThumbnailSavePath());
}
}