Git Product home page Git Product logo

img_optimizer_squarespace's Introduction

Squarespace Image Optimizer

This Python script optimizes images for use on Squarespace by converting and compressing them to formats supported by the platform.

Features

  • Processes PNG, JPG, JPEG, and GIF files
  • Preserves PNG transparency where necessary
  • Converts most images to optimized JPGs
  • Maintains original folder structure in the output
  • Allows customization of JPG compression quality

Requirements

  • Python 3.6 or higher
  • Pillow library (specified in requirements.txt)

Installation

  1. Download or clone this repository:

    git clone https://github.com/houmairi/img_optimizer_squarespace.git
    

    Or download the ZIP file from the repository page and extract it.

  2. Navigate to the downloaded directory:

    cd img_optimizer_squarespace
    
  3. Install the required dependencies using the requirements.txt file:

    pip install -r requirements.txt
    

Usage

Run the script from the command line:

python optimize_for_squarespace.py input_folder output_folder [-q QUALITY]
  • input_folder: Path to the folder containing your original images
  • output_folder: Path where optimized images will be saved
  • -q QUALITY: Optional. JPG quality (0-100, default: 85)

Example:

python optimize_for_squarespace.py original optimized -q 90

Notes

  • This script converts static GIFs to JPGs. Animated GIFs require separate handling.
  • Video files (MP4, MOV, M4V) are not processed by this script.
  • Always review optimized images to ensure they meet your quality standards.

License

MIT License

img_optimizer_squarespace's People

Contributors

houmairi avatar

Watchers

 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.