I just came across this question I asked 13 years ago about pixelating images using the command line
https://graphicdesign.stackexchange.com/questions/8422/how-can-i-pixelate-an-image-via-the-command-line-on-linux
That method of downscaling then upscaling to produce pixelation was acceptable at the time but the problem is that you couldn't easily specify the size of the "big pixels"
Searching again in 2025 and it looks like ffmpeg has had a pixelation filter since 2022 and can be used like this:
ffmpeg -i input.mp4 -vf pixelize=40:40 output.mp4
So now I'm using ffmpeg, a video editor, to pixelate images.