When using an image beacon for tracking, Matomo by default serves an transparent 1×1 GIF image.

As of Matomo 4.5.0 it is possible to serve a custom image instead. To do this the config needs to be adjusted.

You can specify an image either by providing an absolute file path to your image, or by directly configuring a Base64 encoded image. Supported file formats are GIF, JPEG and PNG.

[Tracker]
custom_image = "/path/to/my/image.gif"

or

[Tracker]
custom_image = "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5QgLFiABlwQnpwAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAUSURBVAjXY/wjLMyABJgYUAGpfABbJQEsALGyNgAAAABJRU5ErkJggg=="

If the configured image does not exist or has an unsupported format, Matomo will fall back to serve the transparent GIF instead. Configuring a broken Base64 image string will result in serving a broken image.
To test if your custom image is served correctly, you can simply open your tracking url in the browser, e.g. https://demo.matomo.cloud/matomo.php?idsite=1.