/fn-thumb

generate thumbnails in lambda

Primary LanguageJavaScript

Generate thumbnails in lambda

Unit Testing Status

staging production
Test Test

Example Usage

$result = Curl::to('https://url-to-function.execute-api.us-east-1.amazonaws.com/fn-thumb')
    ->withData(['bucket' => $bucket, 'key' => $key, 'width' => 1024])
    ->asJson()
    ->get();
dump($result->key); // URL the newly created thumbnail

Parameters

  • bucket (required) Bucket name the image is stored in
  • key (required) full path filename of the image (bob-31337.jpg)
  • width (optional, default: 1024) width of the thumbnail (height will follow the original aspect ratio)

Results

  • key the full path filename of the thumbnail created (bob-31337-thumbnail.jpg)