Git Product home page Git Product logo

pyrocms-smushit's Introduction

PyroCMS-SmushIT

What is SmushIT?

Developed by Yahoo, SmushIt uses optimization techniques specific to image format to remove unnecessary bytes from image files.
It is a "lossless" tool, which means it optimizes the images without changing their look or visual quality.

What do you need?

Your server, or hosting, must have

  1. cURL
  2. json

enabled.

How to install?

Simply download or clone the repo and make sure that the folder is named "smushit" without quotes.
Copy and paste the folder in your addons or shared_addons folder and install it via Control Panel.
This module do not have a backend or frontend view, it just have a setting in the Settings module of your site.
By default smushit will run for every images uploaded via Files module, if you do not want it to run automatically go in Settings and disable it.

How it works?

This module will hook to the Files module just after the image upload using file_uploaded event.
The event will check if the uploaded file is a valid image checking its extension and if it is in the allowed extension the module will send the image to smushit.com and then download the smushd one if the size is smaller.
NB: Module doesn't work on localhost just because it will send to smushit the file url not the real image, so smushit is not able to get images from your computer.

pyrocms-smushit's People

Contributors

christiangiupponi avatar

Stargazers

Lungoupao Khongsai avatar

Watchers

James Cloos 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.