I've put a link of what I want below.
Those are called twitter cards and basically, you add
<meta> tags to your page to tell Twitter what to show on them.
I think the type of card you are looking for is this one: https://dev.twitter.com/cards/types/summary-large-image
Here is a snippet with examples how it would work (taken from the docs):
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:site" content="@nytimes"> <meta name="twitter:creator" content="@SarahMaslinNir"> <meta name="twitter:title" content="Parade of Fans for Houston’s Funeral"> <meta name="twitter:description" content="NEWARK - The guest list and parade of limousines with celebrities emerging from them seemed more suited to a red carpet event in Hollywood or New York than than a gritty stretch of Sussex Avenue near the former site of the James M. Baxter Terrace public housing project here."> <meta name="twitter:image" content="http://graphics8.nytimes.com/images/2012/02/19/us/19whitney-span/19whitney-span-articleLarge.jpg">
They even provide you with a service to validate and preview the cards:
For Facebook, the
<meta> tags are different and are also well documented here: https://developers.facebook.com/docs/sharing/best-practices#tags
As with Twitter, they also provide a page where you can validate and preview: https://developers.facebook.com/tools/debug/
Hope that helps!