[imageplugin] Fix MIME media type

1. The file extension might not be the correct MIME type, and is empty
   for images extracted from the clipboard
2. The image is converted to a JPEG, anyway
[imageplugin] Don't percent-encode base64 data