Skip to main content
Imagy - make your website's images load upto 50% faster
===============

Imagy is a file daemon, that watches your website's media root (where your images are stored) and automatically optimizes image files that are created or modified within.

Imagy uses *lossless compression*, so your users never have to load unnecessary bytes. Your images look the same, but load faster.

A lot of work has gone into making it ``set-and-forget``. Instead of having to code up deamons, file watches and handle different file formats on your own, Imagy does all the work for you. All you need to do is
::

imagy /awesome/images/

and Imagy will start watching the directory ``/awesome/images/`` and all its subdirectories for images that get created or modified.

The algorithms used are stable (don't further modify files after multiple invocations), however to make trying Imagy out as easy as possible, the default is to keep original files around for later reversal.

If you wish to stop using Imagy, run ``imagy --revert`` which will move all original images back to their initial location

If you have (rightfully) come to the conclusion that you don't really need to keep originals around, set ``KEEP_ORIGINALS`` in ``config.py`` to ``False``. If you want to delete all already stored originals run ``imagy --deloriginals``.


Getting Started
-----------------


Imagy depends on a bunch of binaries (listed at the bottom) for image optimization. On Ubuntu (tested on 11.10) you can install everything with:

::

sudo apt-get install pngnq pngcrush imagemagick gifsicle libjpeg-progs

pip install imagy


That's it. Try it by running ``imagy``.

If you don't have pip installed, you can find more information here: http://www.pip-installer.org/en/latest/installing.html#prerequisites


Example Usage
-----------------

When starting out you can tell Imagy to optimize (initialize) a directory of new images:

::

$ ll img
total 52K
-rw-rw-r-- 1 ddd ddd 50K 2012-06-23 14:45 beach.jpg
$ imagy --init img
2012-06-23 14:48:27,133 INFO Imagy started
2012-06-23 14:48:27,133 INFO Storing settings in /home/ddd/.imagy, you can modify this path in config.py under STORE_PATH
2012-06-23 14:48:27,134 INFO looking for not yet optimized files
2012-06-23 14:48:27,134 INFO Compressing file /home/ddd/img/beach.jpg
$ ll img
total 80K
-rw-rw-r-- 1 ddd ddd 25K 2012-06-23 14:48 beach.jpg
-rw-rw-r-- 1 ddd ddd 50K 2012-06-23 14:48 beach-original.jpg

Afterwards you can let imagy start watching the directory (and all directories underneath it) by running

::

$ imagy img
2012-06-23 14:52:24,794 INFO Imagy started
2012-06-23 14:52:24,794 INFO Storing settings in /home/ddd/.imagy, you can modify this path in config.py under STORE_PATH
2012-06-23 14:52:24,795 WARNING watching /home/ddd/img
2012-06-23 14:52:24,796 INFO waiting for files
2012-06-23 14:52:24,796 INFO Ctrl-C to quit


Credits
-----------------

In the background Imagy uses the awesome library ``smush.py`` which exposes a general interface to handle the various file types.



Dependencies
-----------------

- imagemagick
- gifsicle
- jpegtran (on ubuntu in libjpeg-progs)
- pngcrush
- pngnq

Release files for imagy 0.2.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for imagy 0.2.8
File Size Uploaded
imagy-0.2.8.tar.gz 15.8 kB Details

Release files / imagy-0.2.8.tar.gz

Download URL imagy-0.2.8.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
49366855afb3fcf93d1950b90f59073b95254959cd2f747c3bb141bd58b7383a
BLAKE2b-256 checksum
How to use checksums
4721977d15339fcbeba489e92c940ed78da9429659369900425526a0d1b25b7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.4.0

1 release file

This release

0.2.8 This release

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.2

1 release file

0.1.0

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page