Backported imgur support from 1.7.2.