'how to resize my image preview for website

Hi I'm using the below code to setup a image preview

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#"> <meta property="og:image" content="https://i.imgur.com/VjUU72S.png" width="1200" height="600"/>

It sets up the preview for the link sent but it is really small (see image below)

This is the image preview on discord

However I want it to be alot bigger like the below image

This is Githubs Example

How can i achieve this? ive already tried to do the below

<meta property="og:image" content="https://i.imgur.com/VjUU72S.png" width="1200" height="600"/>

The actual image size is '1200x600'



Solution 1:[1]

Discord relies on the meta tag of twitter cards to render image sizes. More info on twitter website

So, just add this in your head :

<meta name="twitter:card" content="summary_large_image">

Solution 2:[2]

I have come to a solution for this and achieved my goal.

<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta name="description" content="Im Danial Ahmed and this is my personal 
website">
<meta name="twitter:image:src" content="https://imgur.com/DaUY6vk.png">
<meta name="twitter:image:src" content="https://imgur.com/DaUY6vk.png">
<meta name="twitter:site" content="@unofficialdxnny">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="unofficialdxnny (Danial Ahmed) 
index.html">
<meta name="twitter:description" content="Im Danial Ahmed and this is my 
personal website">
<meta property="og:image" content="https://imgur.com/DaUY6vk.png">
<meta property="og:image:alt" content="Im Danial Ahmed and this is my 
personal website">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="600">
<meta property="og:site_name" content="unofficialdxnny">
<meta property="og:type" content="object">
<meta property="og:title" content="unofficialdxnny (Danial Ahmed) Website">
<meta property="og:url" content="https://unofficialdxnny.netlify.app">
<meta property="og:description" content="Im Danial Ahmed and this is my 
personal website">
<meta name="expected-hostname" 
content="https://unofficialdxnny.netlify.app/">
<meta name="theme-color" content="#1167ab">

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Aryqs Ipsum
Solution 2 unofficialdxnny