Skip to content

Add `pngquant:compress` and `pngquant:lint` rake tasks

Nathan Friend requested to merge nfriend-add-pngquant-pipeline-check into master

What does this MR do?

Adds two new rake tasks: pngquant:compress and pngquant:lint.

These tasks help enforce this documentation guideline:

Compress all images with https://pngquant.org/ or similar tool.

pngquant:compress

This task checks all documentation PNG images (docs/**/*.png) and compresses any images that aren't already optimally compressed.

pngquant:lint

This task checks all documentation PNG images (docs/**/*.png) and throws an error if any images are not optimally compressed. The intention is to add this check to our pipeline to enforce the guideline mentioned above.

Current compressions status

We currently have lots of documentation images that aren't compressed. Running pngquant:compress reduces the size of 493 images.

Running pngquant:compress results in an overall reduction of 16.7 MB:

Before: 70.2 MB in the docs directory image
After: 53.5 MB in the docs directory image

Once this MR has been merged, I'll open a new MR that compresses all 493 images mentioned above.

Merge request reports