Skip to content

Create thumbnails

Olivier Paroz edited this page Jan 5, 2016 · 5 revisions

WARNING - BETA QUALITY

This feature is not yet available in production

Create thumbnails

  • for a user
  • for some users
  • for all users
  • for a specific path. This includes mounted shares

Note: it is impossible to access the scanned folder (and its children) while the command is running

Arguments

  • user_id will rescan all files of the given user(s) located in the files folder and create thumbnails of visual media files

Options

  • --all will rescan all files folders of all known users and create thumbnails of visual media files
  • --path, -p limit rescan to this path, eg. --path="/alice/files/Holidays", the user_id is determined by the path and the user_id parameter and --all are ignored
  • --quiet, -q suppress output
  • --regenerate, -r forces the re-generation of thumbnails

Some examples of use:

  • $ sudo -uwww-data ./occ gallery:create-thumbnails --all
  • $ sudo -uwww-data ./occ gallery:create-thumbnails admin
  • $ sudo -uwww-data ./occ gallery:create-thumbnails --path=/admin/files/client\ sync/
  • $ sudo -uwww-data ./occ gallery:create-thumbnails --path=/admin/files/mount_name/

Results

+---------+-------+------------------+--------------+-----------------+--------------+------------+
| Folders | Files | Supported images | New previews | Failed previews | Elapsed time | Total size |
+---------+-------+------------------+--------------+-----------------+--------------+------------+
| 3       | 14    | 14               | 12           | 2               | 00:00:25.4   | 3.06M      |
+---------+-------+------------------+--------------+-----------------+--------------+------------+
Last scanned file /admin/files/vanilla81/sub1/sub2/1280px-Beach_in_pula_(croatia).JPG
+----------------------------------------------+
| List of failed previews                      |
+----------------------------------------------+
| /admin/files/vanilla81/corrupt.jpg           |
| /admin/files/vanilla81/testimage-corrupt.jpg |
+----------------------------------------------+