0

How do I pass markerPass.Logo__c which is a base64 string into my image component?

<Image source={{uri: 'data:image/png;base64,' + {markerPass.Logo__c} + '\''}}/>

1 Answer 1

2

You can do it using the Template Literals by using backtick ``

<Image source={{uri: `data:image/png;base64,${markerPass.Logo__c}\'`}}/>
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! Side note for those completely clueless like me, it seems I also needed to add the style attribute for it to render (at least on Android). Added to image component: style={{width: 66, height: 58}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.