title: How to find an image and get path in twig generated content
body: <p>I am a newbie to PHP Symfony and Twig. I need to dynamically set meta property og:image from the post content, if there is an image. I have a twig code like this.</p>
  <pre><code>&lt;div class=&quot;content&quot;&gt;
  {{ d.description|raw }}
  &lt;/div&gt;
  </code></pre>
  <p>I can and get an image url from the div content if any and set it as a meta property og:image by using javascript but Facebook does not parse JavaScript? Is there a way to do this on server side?</p>