Coder Social home page Coder Social logo

pngarbage's Introduction

pngarbage

A CLI utility to scan web pages for garbage PNGs.

What?

Improper image format usage can be a serious concern for frontend web performance. PNGs can be particularly problematic as they are typically much larger than JPEGs.

pngarbage will scan a URL and attempt to identify cases where PNGs are used when they really shouldn't be.

How?

Currently, pngarbage will flag a png as "garbage" if it has no transparent pixels. Alpha transparency is one of the primary reasons to use a PNG and if a PNG doesn't have any transparent pixels, there's a high likelihood that JPEG could have been used, resulting in serious savings.

Usage

Download the latest binary from the releases page. Then, simply specify the URL to scan and run it

➜  ./pngarbage -url="http://localhost:8080"
===========================
> pngarbage
===========================
Checking:  http://localhost:8080
Number of pngs:  2
http://localhost:8080/sample.png  is garbage! Content-Length:  31520

pngarbage's People

Contributors

mpchadwick avatar

Stargazers

Ronan Guérin avatar Bogdan Ungureanu avatar Michael Cassius avatar Denis Denisov avatar Joey Hoer avatar

Watchers

James Cloos avatar  avatar  avatar

pngarbage's Issues

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.