Tiny Image Improve your websites performance by providing a clean and easy interface to easily optimize image sizes!

Developed by Jason McCallister

Tiny Image is a plugin which allows you to provide a clean and easy to use interface for clients to compress their images using the TinyPNG API.


- Easily set an Image Threshold Maximum Size. Images that exceed this size will display on the Tiny Image tab for compression.

- Ignore Images that have already been compressed but are still above the threshold size.

- Optimize images as soon as they are saved. Clients can upload assets and never know they are being optimized.

Note: This version of Tiny Image does not support Amazon S3, Rackspace Cloud Files, or Google Cloud Storage assets. However, this is on the roadmap along with a few other features.

New in version 1.1.0

- Major refactoring of codebase.

- Added tasks for image optimization!

- Added the ability to optimize an entire source with one click, as a task with subtasks!

- Added the ability to automatically optimize an image on asset save.

- Added additional sizes to the options (1.25, 1.5, 1.75 and 2.0 MB)

- Fixed a bug where subfolders were not processed properly.


A free API key from https://tinypng.com.

Note: TinyPNG provides 500 free image compressions per month, each compression over your monthly limit will be charged $0.009 per compression. Each month your limit will reset and you will only be charged after 500 compressions.

You can read more on TinyPNG pricing here: https://tinypng.com/developers


* Download the plugin.

* Unzip the folder and make sure its named/renamed to `tinyimage`.

* Place the folder into the `plugins` directory.

* Login to the Craft control panel and go to settings > plugins and install Tiny Image.

* Enter your API key from https://tinypng.com

* Make magical images!


Issues with SSL

If you run into an errors with SSL, you can go to the settings page and enable the option "Use SSL Certificate". Most installations do not require this option.

If you do not have fopen/curl installed on the server

You can go into the settings page and change the "Protocol" setting to toggle between the options. Guzzle will become an option and is on the roadmap.

Plugin Development 101

Don't miss any Craft tips, tricks, and community updates