tex4ht may also be usable for this purpose, but I couldn't find an
easy way to install
If you want to play with it, install a scheme-minimal TeX Live
(http://tug.org/texlive/acquire-netinstall.html) and then run
tlmgr add tex4ht.
In practice, there is no other practical way to get tex4ht at present.
Maybe that will change one day. <long story omitted>
In any case, I have no recipe to generate images for TeX fragments using
tex4ht (I'm sure it can be done somehow, but ...), so you may not want
to bother. I have to be doubtful that generating images is what is
really desired, anyway. -k