fixed bug that prevented external images from being uploaded