diff --git a/lib/base.php b/lib/base.php index 86620ff95a75..a9d582dcc393 100644 --- a/lib/base.php +++ b/lib/base.php @@ -654,7 +654,9 @@ public static function init() { self::registerCacheHooks(); self::registerFilesystemHooks(); - self::registerPreviewHooks(); + if (\OC::$server->getSystemConfig()->getValue('enable_previews', false)) { + self::registerPreviewHooks(); + } self::registerShareHooks(); self::registerLogRotate(); self::registerLocalAddressBook();