working download in png or jpg