'Discord/Twitter/others preview for link not working

So I've been trying to make a preview for my website images, on cdn.luckiecrab.nl and I've asked few people and they tried to help me but it didn't work. So the current code I have in my <head> tag is https://srcb.in/WkIJoS2DrX but it doesn't load a preview on Discord. Tho someone else helped me with the above code, they have the exact same and at them a preview does load on Discord. But I have exactly the same! https://media.discordapp.net/attachments/272764566411149314/920237218373713961/unknown.png?width=1440&height=514 Can someone help me, why at them a preview loads but at me it won't and how I can fix it?



Solution 1:[1]

I have a solution. The below will give you your preview. Obviously change the details...

<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://i.imgur.com/VjUU72S.png">
<meta name="twitter:image:src" content="https://i.imgur.com/VjUU72S.png">
<meta name="twitter:site" content="@unofficialdxnny">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="unofficialdxnny (Danial Ahmed) 
Website">
<meta name="twitter:description" content="Im Danial Ahmed and this is my 
personal website">
<meta property="og:image" content="https://i.imgur.com/VjUU72S.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/">

Edit: You would obviously need to edit the details between the ""

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