fixes #2672 Custom image to replace default 1x1 GIF image
Added a new config option which may be used to specify a custom image to override the default 1x1 transparent gif.
Either a image file location (with full path) or a base64 image string may be used.
[Tracker] custom_image = /path/to/my_custom_image.png
[Tracker] custom_image = "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5QgLFiABlwQnpwAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAUSURBVAjXY/wjLMyABJgYUAGpfABbJQEsALGyNgAAAABJRU5ErkJggg=="
Two unit tests are included which set the config option for both an image file and base64 image string, then check the respective tracker responses against the original image data.
Thanks for the suggestions, much appreciated.
@bx80 it seems the tests you have added are failing. See https://app.travis-ci.com/github/matomo-org/matomo/jobs/531164790#L735
The tests were failing because of the image recreate commit I'd previous added, a recreated image wouldn't match the original source image. I've reverted image recreation change due to performance and so the tests should now pass.
This issue is in "needs review" but there has been no activity for 7 days. ping @matomo-org/core-reviewers
@sgiehl could you create an FAQ on matomo.org about how to change the tracking image before merging it? If we send a broken image when misconfigured then we should mention this also in the FAQ. We would need to mention how they can test the image.