public function getMinimalistObjectFromData(File $file, $thumbnailLinks = true)
    {
        $object = array(
            'id' => (int) $file->ID,
            'parent' => null,
            'title' => $file->Title,
            'exists' => $file->exists(), // Broken file check
            'category' => $file instanceof Folder ? 'folder' : $file->appCategory(),
            'extension' => $file->Extension,
            'size' => $file->AbsoluteSize,
            'published' => ($file->hasMethod('isPublished')) ? $file->isPublished() : true,
            'modified' => ($file->hasMethod('isModifiedOnDraft')) ? $file->isModifiedOnDraft() : false,
            'draft' => ($file->hasMethod('isOnDraftOnly')) ? $file->isOnDraftOnly() : false,
        );

        /** @var Folder $parent */
        $parent = $file->Parent();

        if ($parent) {
            $object['parent'] = array(
                'id' => $parent->ID,
                'title' => $parent->Title,
                'filename' => $parent->Filename,
            );
        }

        /** @var File $file */
        if ($file->getIsImage()) {
            $thumbnails = $this->generateThumbnails($file, $thumbnailLinks);

            if ($thumbnailLinks) {
                $object = array_merge($object, $thumbnails);
            }
            // Save dimensions
            $object['width'] = $file->getWidth();
            $object['height'] = $file->getHeight();
        } else {
            $object['thumbnail'] = $file->PreviewLink();
        }

        return $object;
    }