I made a mistake and I had to recreate the files from the originals.
As nobody answered my last question, I had to find a way to do it myself.
If anybody has the same problem, this is what I’ve done:
First recreate the non-original version:
for f in *_o*.* ; do g=$(echo $f |sed s/_o//) ; if [ -f $g ] ; then cp "$g” "$f” ; else echo "$g -> $f” ;fi ; done
it will not work if you upload originals with ‘_o’ in the name…
I moved the originals in another place:
mkdir ~/ghost_originals
mv *_o*.* ~/ghost_originals
I will regularly move those originals on a dedicated bucket to save place on my server.
Then I re-optimized the pictures:
find . -print0 | xargs -0 -P8 -n2 mogrify -auto-orient -strip -thumbnail '2000x2000>' -quality 80%
This command:
- reorient the image
- remove the metadata
- resize to 2000px max
- compress to 80%
It may be not exactly the same result as before, but it saved my day.
After that, I cleaned the non-used images with ghost-purge-images