<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Elia Alonso</title>
    <description>The latest articles on DEV Community by Elia Alonso (@eliaar).</description>
    <link>https://dev.to/eliaar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F706528%2Ffd31b83c-3318-484f-8523-9c42dfb760d2.png</url>
      <title>DEV Community: Elia Alonso</title>
      <link>https://dev.to/eliaar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eliaar"/>
    <language>en</language>
    <item>
      <title>How to share your website links with image in Linkedin</title>
      <dc:creator>Elia Alonso</dc:creator>
      <pubDate>Wed, 15 Sep 2021 14:37:40 +0000</pubDate>
      <link>https://dev.to/eliaar/how-to-share-your-website-links-with-image-in-linkedin-33g9</link>
      <guid>https://dev.to/eliaar/how-to-share-your-website-links-with-image-in-linkedin-33g9</guid>
      <description>&lt;p&gt;Few weeks ago, when I wanted to publish my App &lt;a href="https://eliaar.github.io/Full-API-Rick-and-Morty-React-implementation/"&gt;"El Mejorado Buscador de Rick y Morty"&lt;/a&gt; in Linkedin post, I found a problem: my website preview appeared without any image 😖. I had seen posts in which there were images, so I believed that it happened automatically; however, on second thought, it didn't make sense. How is going to decide the image that had to be shown in the preview? 🤦‍♀️&lt;/p&gt;

&lt;p&gt;That's why I started to look for a solution. I discovered I had to write some meta tags in head to comply with necessary information for my website. These are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; 
  &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:title"&lt;/span&gt; 
  &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"Title of the article"&lt;/span&gt; 
&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; 
  &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:description"&lt;/span&gt;
  &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"Description that will show in the preview"&lt;/span&gt;
&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; 
  &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:image"&lt;/span&gt;
  &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"//media.example.com/ 1234567.jpg"&lt;/span&gt;
&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; 
  &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:url"&lt;/span&gt;
  &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"//www.example.com/URL of the article"&lt;/span&gt; 
&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Image have to meet some requirements: 5MB max file size, 1200(w)x627(h) px, 1.91:1 ratio&lt;/p&gt;

&lt;p&gt;After make this changes live, I tried again to preview my post on Linkedin; but it didn't work. The reason why is Linkedin is caching websites for seven days; fortunately there is a tool to clean this cache. You just have to go to &lt;a href="https://www.linkedin.com/post-inspector/"&gt;"Linkedin post inspector"&lt;/a&gt;, enter your website URL and click on "inspect" button. And that's all folks! 😜&lt;/p&gt;

&lt;p&gt;Here is the result&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nKElmaGm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ljz75j0swf6o1jek7mlt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nKElmaGm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ljz75j0swf6o1jek7mlt.png" alt="preview result in Linkedin"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
