(almost) Fixing image insertion