adds support for the new /media (image upload) endpoint