title: go-wkhtmltopdf cannot show image
body: <p>I am using <code>github.com/SebastiaanKlippert/go-wkhtmltopdf v1.6.1</code>. I want to create simple biodata with HTML file. I try to add floating image (profile picture) at right corner, but the image is not showing</p>
  <p>This is my sample test.html file</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body style="padding: 50px; text-align: justify;"&gt;
      &lt;h1 style="text-align: center;"&gt;Biodata&lt;/h1&gt;
      &lt;br&gt;
      &lt;div style="float: right; margin-bottom: 30px;"&gt;
        &lt;img src="../image/profile_pic.jpeg" height="150px"&gt;
      &lt;/div&gt;
      &lt;div&gt;
      &lt;strong&gt;Name:&lt;/strong&gt; John
      &lt;/div&gt;
      &lt;br&gt;
      &lt;strong&gt;Birth date:&lt;/strong&gt; 2001-01-01
      &lt;br&gt;
      &lt;br&gt;
      &lt;strong&gt;Birth place:&lt;/strong&gt; Unknown
      &lt;br&gt;
      &lt;br&gt;
      &lt;Strong&gt;Sex:&lt;/Strong&gt; Male/Female
      &lt;br&gt;
      &lt;br&gt;
      &lt;strong&gt;Height:&lt;/strong&gt; 200 cm
      &lt;br&gt;
      &lt;br&gt;
      &lt;strong&gt;Hobby:&lt;/strong&gt; Sleeping
      &lt;br&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>This is the Go code</p>
  <pre><code>import (
      &quot;bytes&quot;
      &quot;fmt&quot;
      &quot;html/template&quot;
      &quot;strings&quot;
  
      gopdf &quot;github.com/SebastiaanKlippert/go-wkhtmltopdf&quot;
  )
  
  func init() {
      htmlTmp, err := template.ParseFiles(&quot;files/html/test.html&quot;)
      if err != nil {
          fmt.Println(err)
          return
      }
  
      buf := new(bytes.Buffer)
      err = htmlTmp.Execute(buf, nil)
      if err != nil {
          fmt.Println(err)
          return
      }
  
      pdfGen, err := gopdf.NewPDFGenerator()
      if err != nil {
          fmt.Println(err)
          return
      }
  
      pageReader := gopdf.NewPageReader(strings.NewReader(buf.String()))
      pageReader.PageOptions.EnableLocalFileAccess.Set(true)
      pdfGen.AddPage(pageReader)
      if err := pdfGen.Create(); err != nil {
          fmt.Println(err)
          return
      }
  
      if err := pdfGen.WriteFile(&quot;files/generated/test.pdf&quot;); err != nil {
          fmt.Println(err)
          return
      }
  }
  </code></pre>
  <p>This is what it looks like when I run the code: <a href="https://i.stack.imgur.com/2uW90.png" rel="nofollow noreferrer">test_from_code</a></p>
  <p>I already use the option to enable local file access, but the image is still not showing. Instead, there is a block at where the image should be showing</p>
  <p>Expected behavior
  I try to use wkhtmltopdf from terminal to see the differences</p>
  <p><code>wkhtmltopdf --enable-local-file-access files/html/test.html files/generated/test.pdf</code></p>
  <p>This is the result: <a href="https://i.stack.imgur.com/Xulk1.png" rel="nofollow noreferrer">test_from_terminal</a></p>
  <p>It shows the image where I want them to be</p>
  <p>What should I do to get the expected result from code?</p>