Image compression module for Fork CMS. Uses the free TinyPNG & TinyJPG API service to compress images on your website for faster page loads.
The Fork CMS Compression module lets you compress PNG & JPG images on your website. Use this module to shrink images on your website,
so they will use less bandwidth and your website will load faster. The compression module uses the compression engine
of TinyPNG and TinyJPG.
Pick folders with images to compress:
Execute image compression via the console window:
See stats on the dashboard:
I did the test with 3 images (3264x2448 resolution) taken from my camera. I uploaded and inserted the photos on a Fork CMS page and used the compression module. The images total size went from 8.2MB to 1.5MB!
/src/Backend/Modules/Compression
folder to your /src/Backend/Modules
folder.Settings > Modules
. Click on the install button next to the Compression module.Settings > Modules > Compression
and enter your API key for TinyPNG. Get a free API key (500 images/month for free) here.Modules > Compression
and choose one or more folders with images to compress. Save your preference.Console
tab and start compressing images on the fly.Note: We store a history of compressed files in the database with checksum. By doing that, we can ignore files that already have been compressed and skips them when a new compression task starts. This saves your TinyJPG api credits when doing multiple runs of the compression process.
If you encounter any bugs, please create an issue (or feel free to fix it yourself with a PR).
To release a new version: go to Github Actions -> Run Workflow -> and fill in a release tag and hit “Run Workflow”. A Github action will take care of preparing release notes, CHANGELOG.md
and VERSION.md
bumps.