@bx80 opened this Pull Request on August 12th 2021 Contributor


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

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.


  • [x] Functional review done
  • [ ] Potential edge cases thought about (behavior of the code with strange input, with strange internal state or possible interactions with other Matomo subsystems)
  • [ ] Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • [ ] Security review done see checklist
  • [x] Code review done
  • [x] Tests were added if useful/possible
  • [x] Reviewed for breaking changes
  • [ ] Developer changelog updated if needed
  • [ ] Documentation added if needed
  • [ ] Existing documentation updated if needed
@bx80 commented on August 12th 2021 Contributor

Thanks for the suggestions, much appreciated.

@sgiehl commented on August 16th 2021 Member

@bx80 it seems the tests you have added are failing. See https://app.travis-ci.com/github/matomo-org/matomo/jobs/531164790#L735

@bx80 commented on August 17th 2021 Contributor

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.

@github-actions[bot] commented on August 25th 2021 Contributor

This issue is in "needs review" but there has been no activity for 7 days. ping @matomo-org/core-reviewers

@tsteur commented on August 29th 2021 Member

@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.

@sgiehl commented on September 3rd 2021 Member
@justinvelluppillai commented on September 5th 2021 Member

Thanks @bx80!

This Pull Request was closed on September 3rd 2021
Powered by GitHub Issue Mirror