GithubHelp home page GithubHelp logo

carzam87 / python-bulk-image-optimizer Goto Github PK

View Code? Open in Web Editor NEW
20.0 3.0 6.0 17 KB

Python Bulk Image Optimizer is a simple script to compress all your images at once.

License: MIT License

Python 100.00%

python-bulk-image-optimizer's Introduction

bulk-image-optimizer.py

This is a simple script that allow you to optimize/compress all your images at once.

Working on a Wordpress project, I needed to optimize all images inside the upload folder (over 500 images and placed on several folders) and I didn't want to pay for any plugins/services, so I decided to do it myself. I wrote this python script to compress all the files inside an "input" folder keeping the subfolders structure. This script use Pil (or Pillow), a Python Imaging Library to compress the images.

Installation

Dependencies

Install PIL or Pillow

    pip install Pillow

Usage

  1. Download the python script.

  2. Put all your images that to be compressed inside the "input" directory. All compressed images will be saved in the "output" directory.

  3. Select quality level for output images

		 opt.save(out_path, optimize=True, quality=<your desired quality level>)
  1. Run script
		python3 python-bulk-image-optimizer.py

python-bulk-image-optimizer's People

Contributors

carzam87 avatar

Stargazers

Noah Buchanan avatar 名前ない avatar null data avatar  avatar  avatar  avatar Anslem avatar Parth avatar  avatar Rodolfo Souza avatar Diego Ojeda avatar André Escocard avatar  avatar 5l1v3r1 avatar Izzudin Anuar avatar Wahyu Purnomo avatar eagle avatar  avatar  avatar Alvaro Chavez avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.