Admin Forum:Losslessly compressing all images on a wiki

Anyone know of an automated way to losslessly compress all images on a wiki? Or, barring that, anyone know of an automated way of downloading every image on a wiki and then re-uploading new versions to the correct fileame? 05:10: Sun 11 Nov 2012