There is still some time until Firefox 50 becomes stable in November 2016, but as a noteworthy number of developers could use it already from September when it will promoted to Firefox Developer Edition (in fact, I’m using it already with Firefox Nightly), I suppose it is not too early to point out that the following firefoxPastingHack for pasting images will not be necessary (and even counterproductive) any more due to clipboardData.items being implemented in Firefox 50 (see Mozilla Bug 906420):
This said, pasting an image into Discourse using Firefox 50 currently yields two to four (mostly three) instances of the same image being inserted:
This is due to the fact that the paste event contains both a png and a jpeg version of the image. Whether this is intended or not, is expected to be cleared very soon (in Mozilla Bug 1290688) and so we can anticipate a fix or (if it’s a feature) a hint on how to solve this conceptually.