regenerate.php

Gallery3x1 min readPage 15 of 22

Gallery3x console scripts are run over SSH from the site root (next to the core folder). They are not available over HTTP (403).

Regenerating all thumbnails

Needed after changing sizes in the media source, the format, filters or the watermark: thumbnails that were already generated are not updated by themselves.

php core/components/gallery3x/cli/regenerate.php
MODX Initialized. Starting regeneration...
Found 58 files to process.

Processing file ID: 1 (Resource: 2, Filename: photo1.jpg)
Processing file ID: 2 (Resource: 2, Filename: photo2.jpg)
...
----------------------------------------
Done! Regenerated thumbnails for 58 of 58 files.
Site cache has been cleared.
  • All images of all resources are processed, each with the settings of its own media source.
  • Lines WARNING: Could not create thumbnails: … show which sizes could not be generated (usually a broken file or not enough memory); WARNING: Could not initialize media source — the image's media source is unavailable.
  • The site cache is cleared at the end.

For individual images the same is done in the manager: right click → “Regenerate thumbnails”.