chose local pic transform to base64 for javascript use