Skip to content

Script for batch compressing / resizing images using tinypng / tinyjpg

Notifications You must be signed in to change notification settings

ozamodaz/tinypng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Batch compressing / resizing images using tinypng / tinyjpg

Requirements:

pip install tinify

Get your API Key at https://tinypng.com/developers (The first 500 compressions each month are free) And set it in the top of script:

 tinify.key = 'YOUR API KEY'

Default behavior is to compress all image files in the same directory as the script is. Compressed images will be saved to './compressed' directory. The directory will be created if needed. If not empty, script will skip theese filenames, considering them as already comressed.

you may like to tune resize options for your needs

resized = source.resize(
        method="scale",
        width=1000,
        )

resizing methods and other cool stuff described here: https://tinypng.com/developers/reference/python

About

Script for batch compressing / resizing images using tinypng / tinyjpg

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages