Skip to content

ozk404/Optimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Optimizer

N|Solid

Optimizer is a TinyPNG Python Script to compress and optimize images

Why? Because compressing images is one of the best practices to improve the performance of a website, it is very beneficial and is something that every developer should try

Install:

Optimize use a TinyPNG Python library (Tinify) to install use

pip install tinify

And you need a API developer Key from TinyPNG (you can get with your email in https://tinypng.com/developers)

How to use:

This script was created to be used in a Windows command console, however some changes can be made and optimized so that it can be used in any other Operating system.

With Optimizer you can:

  • Compress only one image
  • Compress an entire folder
  • Compress image from URL

You can use the cmd commands for executing the script or following the menu instructions.

-i or --image to Compress only one image
use: opt.py -i testimage.png
 
-d or --directory to Compress an entire folder
use: opt.py -d C:\Users\Directory
 
-u or --url to Compress image from URL
use: opt.py -u http://www.somedomain.com/image.jpg

Do not enter any option and you will get the Menu instructions

You can edit, redistribute and copy this code, make it yours and enjoy it!

About

TinyPNG python script

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages