title: Using image_file on facebooks marketing api
body: <p>I'm using php sdk (default graph version 2.9)</p>
  
  <blockquote>
  <pre><code>    "facebook/graph-sdk": "5.5.0",
      "facebook/php-ads-sdk": "2.8.2"
  </code></pre>
  </blockquote>
  
  <p>I'm trying to create an ad creative without creating the image first and using it's hash.</p>
  
  <pre><code>            $creative = $this-&gt;_fb_account-&gt;createAdCreative($all_fields, [
              'name'          =&gt; 'my first ad creative',
              'title'         =&gt; 'my title',
              'body'          =&gt; 'my body',
              'image_file'    =&gt; '/path/to/my_file.png',
              'object_type'   =&gt; AdCreativeObjectTypeValues::DOMAIN,
              'object_url'    =&gt; 'http://example.com',
          ]);
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>#errorUserTitle: "Invalid image file"
        #errorUserMessage: "The image_file field does not specify a POST file name."</p>
  </blockquote>
  
  <p>I can't find anything about this in the <a href="https://developers.facebook.com/docs/marketing-api/reference/ad-creative" rel="nofollow noreferrer">docs</a>.
  Here is a related <a href="https://stackoverflow.com/questions/22592146/upload-image-file-using-ads-api/">stackoverflow question</a> which also did not fix the problem.</p>