by request, added option to insert img's width first