Check out example codes for "how to change the preview image of a website". It will help you in understanding the concepts better.

Code Example 1

<meta property="og:image" content="image_url_here" />

Learn ReactJs, React Native from akashmittal.com