I followed the link and using png's instead of gif's solved the problem. Great! But I really can't understand why. I use the same Moodle distributions on my two servers, the path settings in the Tex-filter is ok, and I am running
pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
on my new (bad) server
pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
on my old (good) server.
So why would there be a mismatch?