fixes for tm2 image drag-drop snippet

Existing version does not compile as incorrect image width is inserted.