• MODX.com

    4,192 downloads

SmushIt

SmushIt is an extra by stewartorr, first released on 2026-02-02.

Package Description

Smushit 2.0.1

It now adds a cimple MODX CMP so see the optimised images.

This snippet tries to optimise and compress PNG and JPEG images for better performance using the resmush.it optimisation API. This will help massively with Google Page Speed and can reduce image sizes by up to 70%. This will overwrite any existing images so is intended to be used as an output filter after pthumb or similar.

Usage/Installation Instructions

Install the package using package manager and you will then need to update your output to use the smushit output modifier.

Snippet smushit

This snippet expects to be used as an output filter in the following format:

This will use pthumb to resize the image and then smush it to optimise the file. The thumbnail image is overwritten once and from then on is optimised. This affects first uncached performance so you should review if this is worthwhile. After caching it runs fine and then helps the page load speed by using the new files.

As this is a first release, your feedback and requests are welcome.

More information available on my blog: https://www.stewartorr.co.uk/smushit

Details

Developer(s)
stewartorr
Released
2026-02-02
First seen
2026-02-02
License
GPLv2
Supported databases
Minimum MODX Requirement
3.0

SmushIt Releases

Vendor Signature Released on
MODX.com 2.0.1-pl 2026-02-02 (1 day ago)
MODX.com 2.0.0-pl 2026-02-02 (1 day ago)
MODX.com 1.0-beta1 2016-10-25 (9 years ago)