added support for pasting images from clipboard