Was just testing out `folder()` + `files()` from the reference and ran into a bug when placing images into a Rectangle (new feature) – it kept giving the error:

> Error: This value would cause one or more objects to leave the pasteboard.

Checked out the `image()` function and found out it's a bug with the `frame.transform(...` within the else{ } statement towards the bottom.. 

```
 } else {
    // frame.transform(CoordinateSpaces.PASTEBOARD_COORDINATES,
    //                AnchorPoint.TOP_LEFT_ANCHOR,
    //                currMatrix.adobeMatrix(x, y));
  }
```

guessing it needs a boolean switch if the image is placed into a Rectangle/Oval/Polygon – and if so, ignore the imageMode + transformation, since one wouldn't want the shape to move at all, just have the image be placed inside.

Here's the code I was testing:

```
// @includepath ~/Documents/;%USERPROFILE%Documents; 
// @include basiljs/basil.js; 
 
function draw() { 
  var output = layer("output");
  clear(output);
  
  var imgDir = folder("*path to images*");
  var imgs = files(imgDir, {filter: ["jpeg", "jpg"]});
  
  for(var i=0; i < imgs.length; i++){
    beginShape(CLOSE)
    vertex(random(width), random(height));
    vertex(random(width), random(height));
    vertex(random(width), random(height));
    var temp = endShape();
    image(imgs[i], temp);
  }
} 
```