Attaching arbritrary formats with "Insert Image"

One thing I found strange with Pidgin was that the “Insert Image” button only allows you to insert some image formats, even though for protocols like Discord and XMPP the method for attaching an image is the same as the method for attaching any other kind of file. I was wondering why that was (I’m guessing it’s for legacy reasons since libpurple plugins are already designed for attaching only images they might break if you try to get them to send something else) and if anyone has any plugins/patches/other workarounds to attach other file formats for those protocols who support it.

For XMPP specifically there’s a plugin that allows you to attach non-image files by starting a transfer with the server (although it is broken for me), but it would be nice to be able to try and force existing libpurple plugins to try and attach arbitrary file formats (though for afformentioned reasons I’d assume this wouldn’t be possible without changing the plugins themselves (but maybe I’m wrong!)).

Yeah it’s all legacy reasons as the old protocols really only supported jpeg/png and didn’t do any additional processing.

Protocol plugins in pidgin 3.0 (still in dev) will have access to GdkPixbuf that’ll allow them to convert images to other formats and potentially do resizing and stuff.

Thanks for the reply! Follow up question/clarification: should we expect support for attaching a file of any format (including stuff that’s not an image) to messages in pidgin 3.0 or is it better if I make my own plugin for something like that?

It will be built in.