encode images with base64enc package if available