title: insert image in composition with adobe effect script
body: <p>I have a project in Adobe After Effect CC 2015. In a <em>Placeholder</em> folder are 100 composition items. Each of these 100 compositions have no layer and are of the size 1100px*1100px (see image below). I have also 100 images named from 1.jpg to 100.jpg of the same size(1100px*1100px).</p>
  
  <p>My goal: <strong>Image x.jpg should be placed as an image layer in composition x with my script</strong></p>
  
  <p>I would like to write a script for that. I managed to iterate through the 100 compositions with the following code:</p>
  
  <pre><code>var placeholder = app.project.item(2);
  
  for(i = 1; i &lt;= placeholder.numItems; i++){
    alert(placeholder.item(i).name);
  }
  </code></pre>
  
  <p>Now instead of alerting the name, I would rather like to insert my images to the corresponding layer. I looked in the <a href="http://blogs.adobe.com/wp-content/blogs.dir/48/files/2012/06/After-Effects-CS6-Scripting-Guide.pdf?file=2012/06/After-Effects-CS6-Scripting-Guide.pdf" rel="nofollow noreferrer">After-Effects-CS6-Scripting-Guide</a> and checked the attributes and method list of the <code>compItem</code> that I am dealing with (page 52). However, I didn't find a method to add an image to the composition.</p>
  
  <p>Is it not possible or did I overlooked something?</p>
  
  <p><a href="https://i.stack.imgur.com/eqsvp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eqsvp.png" alt="enter image description here"></a></p>