Repository navigation
Commands
Jan Hermann edited this page Oct 9, 2026
·
1 revision
⌨️
Console commands of the bundle. They need symfony/console, which is only suggested.
php bin/console imagony:checkChecks that PHP and the configuration are able to produce thumbnails and says what to fix.
- Lists the drivers with their version and WebP/AVIF support.
- Compares them with the configured
formats. - Checks
base,folder(exists or can be created, is writable),fallback(exists, is insidebase) and the folders of templates.
A missing fallback or template folder is only a warning. The exit code is 1 when thumbnails can not work as configured, so it can be used in a Docker build or CI.
Removes generated thumbnails, including their .webp and .avif siblings.
php bin/console imagony:clean --dry-run # lists what would be removed
php bin/console imagony:clean # asks for confirmation
php bin/console imagony:clean --force # no question, e.g. in a deploy script
php bin/console imagony:clean -v # also lists the removed files- Removes files from
imagony.thumbnails.folderincluding subfolders of templates. Source images, folders and dot files (e.g..gitkeep) are kept. - Thumbnails are generated again when a page needs them, so it is safe to run after changing a template size, the flags or the formats.
- Without interaction (a script, CI) it removes nothing unless
--forceis given. - It refuses to run (exit code
1) whenfolderis, or contains,baseor the folder of any template. - The same is available from PHP as
Thumbnail::clean().