Serverless Image Handler
Serverless Image Handler

Appendix F: Viewing the Metadata

This solution leverages thumbor_rekognition to incorporate Amazon Rekognition capabilities. To understand and identify Thumbor operations and validate the solution before using it in a production environment, you must prepend all of the solution parameters /debug. (for example: http://<cloudfront-id>.net/debug/300x300/smart/<s3-prefix-path>/picture.png)

To view the metadata on all Thumbor operations, add /meta/ to all of the URLs (for example: http://<cloudfront-id>.net/meta/300x300/left/top/smart/<s3-prefix-path>/picture.png). Once the processing is finished, Thumbor will return a .json object with the metadata on the image and the operations that would have been performed. For more information, see Metadata Endpoint.

{ thumbor: { source: { url: "path/to/my/nice/image.jpg", width: 800, height: 600 }, operations: [ { type: "crop", left: 10, top: 10, right: 300, bottom: 200 }, { type: "resize", width: 300, height: 200 }, { type: "flip_horizontally" }, { type: "flip_vertically" } ] } }