This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Description
Hi,
Is there a reason to skip the cache folder while removing missing images?
// Cached path guard
if ($this->isInCachePath($file)) {
continue;
}
Thanks to this module we've managed to reduce the size of the media folder from 160GB to 149GB. It's a good start but I believe the missing images will still occur in the cache folder after a catalog:image:resize.
We used a bash script to remove the images from the cache folder without noticeable result on the storefront. (lost the result of the reduced size).
#!/bin/bash
echo "Start!"
while read image; do
echo "found $image in .txt"
for file in $(find pub/media/catalog/product/cache/ -path "*$image");
do
rm $file;
echo "removed ${file} from filesystem";
done;
done <removed_images.txt
echo "Done!"
Would love to hear a response if you would consider implementing this feature or not.