This does exactly what you want, but also alter the topics list like /latest layouts.
It works by overriding an existing template.
If you want to change only the /categories layout, you can follow these instructions:
Note that templates sometimes change in Discourse, so the new code may need adjustments from time to time (it could also go for years without any modification needed).
I got all of this info by searching #support display topic author avatar