The previous behaviour can be restored by adding the following to your
ikiwiki setup:
- teximg\_prefix => '\documentclass{scrartcl}
+ teximg_prefix => '\documentclass{scrartcl}
\usepackage[version=3]{mhchem}
\usepackage{amsmath}
\usepackage{amsfonts}