Home

K
@kheersagar
June 17, 2025Updated 12/8/2025HTML

TinyPNG like compression offline and bulk

TinyPNG like compression offline and bulk

If you want to compress images like TinyPNG without lossing quality and you want to compress bulk png then you can try below.

I have tried this and it worked there are many ways you can try another way as well

# ensure package installed
sudo apt install zopfli

# adjust accordingly in my case I am considering p. Use with caution
# Always ensure you have backup of your directory
# Try to narrow down
find ~/p -type f -iname '*.png' -exec sh -c 'zopflipng --iterations=15 --filters=0me "$1" "$1.tmp" && mv "$1.tmp" "$1"' _ {} \;

If image is in other format

find ~/p -type f \( -iname '*.jpg' -o -iname '*.jpeg' \) -exec sh -c '
  for img; do 
    png="${img%.*}.png"; 
    convert "$img" "$png" && rm "$img"; 
  done
' sh {} + && \
find ~/p -type f -iname '*.png' -exec sh -c '
  for img; do 
    zopflipng --iterations=15 --filters=0me "$img" "$img.tmp" && mv "$img.tmp" "$img"; 
  done
' sh {} +

<!DOCTYPE html>
<html lang="en">
<head>
<style></style>
</head>
<body></body>
<script></script>
</html>

You may also like

PlayVerse, Your Offline Mobile Games Collection

# PlayVerse, Your Offline Mobile Games Collection Looking for a mob...

Continue reading

What Are Some Good Ways to Take Notes While Programming?

What Are Some Good Ways to Take Notes While Programming?

Continue reading

Who Are Evernote’s Competitors?

Who Are Evernote’s Competitors?

Continue reading