Interest in integrating Imgur API into core editor plugin?
I created the ImgurUpload plugin just before the new editor landed, which has the kind of easy drag-n-drop in it that my users were always complaining about ("Facebook is way easier!"). But hosting images on your own site is expensive, and why do it when the Imgur API is so good?
I was thinking about submitting a pull request to extend the editor with configurable Imgur API integration, but I'm not sure what the preferred approach for achieving this would be, from the perspective of a Vanilla core dev.
To keep the need for supporting a third-party service out of the core, I could update plugins/editor/js/editor.js to expose some callbacks, or hooks, that can be utilised by my plugin or any other plugin to hijack default functionality.
My own use cases would require hooks at two points:
- When checking permissions, as I want to allow Imgur API upload for all users, but only have file upload for some users
- When uploading the file, as images should go via Imgur, and non-images via the default file uploader functionality.
This may necessitate refactoring the
fileUploadsInit function quite a bit.