21 Jun 2025
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
What Are Some Good Ways to Take Notes While Programming?
What Are Some Good Ways to Take Notes While Programming?
Continue readingIntegrating a Facebook Like button into a website with HTML and JavaScript
This blog post provides a detailed guide on how to integrate a Faceb...
Continue reading