update image upload function, make it available to png.