added inline attachment functionality for images