Closed brianjking closed 5 years ago
Hello,
it may cause issues if you run it as root on other directories than wp-content/uploads. There are two ways to fix the issue :
find ./path/to/divi -type f -name '*.webp' -exec rm '{}' \;
chown -R www-data:www-data /path/to/divi
find ./path/to/divi -type d -exec chmod 755 {} \; find ./path/to/divi -type f -exec chmod 644 {} \;
Then the easiest to avoid this issue in the futur :
1. do not run img-optimize in other folder than uploads
**or**
2. run img-optimize as www-data to avoid permissions issues