You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
Is there a reason to skip the
cache
folder while removing missing images?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 acatalog: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).Would love to hear a response if you would consider implementing this feature or not.
The text was updated successfully, but these errors were encountered: