fix issue with wrong image path when using insert tags