Skip to content

To compress and optimize JPEG and PNG images with Tinify API in Python

License

Notifications You must be signed in to change notification settings

Waterstrong/tiny-png

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tiny-png

To compress and optimize JPEG and PNG images with Tinify API in Python.

Installation and Setup (Mac OS supported only)

  1. Clone the project: git clone https://github.com/Waterstrong/tiny-png.git

  2. Execute the install.sh script and follow the instructions to complete the whole process

  3. Pay attention to the Tinify Key in tinify.key

Usage

The TinyPNG script can compress all case insensitive *.jpg|*.jpeg|*.png target image or images in target directory recursively.

Usage:
   tinypng  help
   tinypng  <target_image>
   tinypng  <target_directory>

Checkout the cache file .tinify.cache in each target directory. It can prevent duplicated compression.

Checkout the log file <your_dir>/tiny-png/tinify.log for compression details log.

IMPORTANT: The script will compress all case insensitive *.jpg|*.jpeg|*.png target image or images in target directory recursively.

Results

Before Compression

Before Compression

After Compression:

After Compression

Powered By:

About

To compress and optimize JPEG and PNG images with Tinify API in Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published