Commit b48fb4fd authored by James Ramsay's avatar James Ramsay

Add pngbot to automatically compress PNG images

pngbot should only run when a merge request is open, and will compress
the PNGs added in the last commit and commit the compressed images
back to the branch.

PNGs are first converted form 24bit to 8bit (256 colors) using pngquant
before being losslessly compressed using zopflipng.

pngbot will report it's actions on the merge request via a comment
which will be updated as more images are processed by pngbot.

See source here: https://gitlab.com/jramsay/pngbot
parent 57459e89
Pipeline #38784565 passed with stages
in 68 minutes and 39 seconds
......@@ -58,6 +58,18 @@ crop_pictures:
tags:
- gitlab-org
pngbot_commit:
image: registry.gitlab.com/jramsay/pngbot:v0.1.0
before_script: []
cache: {}
except:
- master
stage: prepare
script:
- pngbot
tags:
- gitlab-org
rubocop:
stage: build
script:
......
......@@ -686,7 +686,12 @@ For entries that support markdown, use regular [markdown Kramdown](/handbook/pro
[alternative text](/handbook/product/technical-writing/markdown-guide/#image-alt-text)
- {:#images-compressed} Each image should be compressed with [ImageOptim](https://imageoptim.com),
[TinyPNG](https://tinypng.com/), or similar tool
- {:#image-size-limit} Each image should not surpass 300KB, gifs included
- {:#image-size-limit} Each image should not surpass 150KB (300KB for cover
image), gifs included
- [pngbot](https://gitlab.com/jramsay/pngbot) will compress PNG images added in
merge request by converting each PNG to PNG 8 (8 bit, 256 colors) using
[pngquant](https://pngquant.org) before losslessly compressing with
[zopflipng](https://github.com/google/zopfli).
- {:#application-screenshots} **Application screenshots**:
- Make sure that the application screenshot captures the feature to make it
immediately recognizable
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment