protected function prepareFiles(Collection $collection, array $auxDate = [], $deep = true): array
    {
        // Get all images
        foreach ($collection as $fileModel) {
            // Continue if the files has been processed or does not exist
            if (isset($this->images[$fileModel->path]) || !file_exists(TL_ROOT . '/' . $fileModel->path)) {
                continue;
            }

            if ($fileModel->type == 'file') {
                // Single files
                $file = new File($fileModel->path);

                if (!$file->isImage) {
                    continue;
                }

                // Add the image
                $this->images[$fileModel->path] = [
                    'id'         => $fileModel->id,
                    'uuid'       => $fileModel->uuid,
                    'name'       => $file->basename,
                    'singleSRC'  => $fileModel->path,
                    'title'      => StringUtil::specialchars($file->basename),
                    'filesModel' => $fileModel->current(),
                ];

                $auxDate[] = $file->mtime;
            } elseif ($deep) {
                // Folders
                $subfiles = FilesModel::findByPid($fileModel->uuid);

                if ($subfiles !== null) {
                    $this->prepareFiles($subfiles, $auxDate, false);
                }
            }
        }

        return $auxDate;
    }