Fix chemical formula regex (superscript part)
Fix image import and add thumbnail pregeneration