Skip to content

Artisan commands

CommandDescription
imagepresets:clearDelete generated images
imagepresets:verifyFind corrupted, orphaned and suspect cached files

Usage and caveats — Cache maintenance.

Terminal window
php artisan imagepresets:clear [--disk=] [--path=] [--temp]
OptionDefaultDescription
--disk=disk configDisk to clear
--path=path configDirectory inside the disk to delete
--temp—Also empty source_dir and temp_dir

Always exits with 0.

Terminal window
php artisan imagepresets:verify [--disk=] [--path=] [--delete] [--deep] [--gray-threshold=25] [--delete-suspects]
OptionDefaultDescription
--disk=disk configDisk to scan. Local disks only
--path=path configDirectory to scan, recursively
--deleteoffDelete corrupted files and *.tmp* files older than one hour. Without it — dry run
--deepoffAlso decode each .webp and flag gray-filler suspects
--gray-threshold=25Percent of sampled pixels (0–100) that must be rgb(128,128,128) to flag a suspect
--delete-suspectsoffDelete the suspects; implies --deep

Files checked: jpg, jpeg, png, gif, webp, avif. Output lines are Corrupted: …, Orphaned tmp: …, Suspect webp: … — <reason> (with (deleted) when removed), followed by a summary. Always exits with 0, also when problems are found.