HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Interest in integrating Imgur API into core editor plugin?

jamesincjamesinc Sydney ✭✭

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:

  1. When checking permissions, as I want to allow Imgur API upload for all users, but only have file upload for some users
  2. 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.


  • Options
    hgtonighthgtonight ∞ · New MVP

    I would suggest making an addon that extends Advanced Editor. The devs are pretty amenable to adding events if it makes the plugin more extensible.

    I love the idea of imgur upload, but lots of people assume their images are going to be uploaded to the site they are on. Might have to make it visible that the files are being stored with a third party.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Sign In or Register to comment.