---
title: "Auto-crop images around the most important subject before generating thumbnails"
description: "Use smartcrop when an agent needs to choose a sensible crop automatically instead of center-cropping every image. The workflow scores visual saliency, returns crop coordinates for a target aspect ratio, and hands those coordinates to an image pipeline that renders the final thumbnail or social card."
verification: "security_reviewed"
source: "https://www.npmjs.com/package/smartcrop"
author: "Jonas Wagner"
publisher_type: "Open Source Project"
category:
  - "Image & Creative Automation"
framework:
  - "Multi-Framework"
tool_ecosystem:
  npm_package: "smartcrop"
  npm_weekly_downloads: 49019
---

# Auto-crop images around the most important subject before generating thumbnails

Use smartcrop when an agent needs to choose a sensible crop automatically instead of center-cropping every image. The workflow scores visual saliency, returns crop coordinates for a target aspect ratio, and hands those coordinates to an image pipeline that renders the final thumbnail or social card.

## Prerequisites

Node.js and npm

## Installation

Choose whichever fits your setup:

1. Copy this skill folder into your local skills directory.
2. Clone the repo and symlink or copy the skill into your agent workspace.
3. Add the repo as a git submodule if you manage shared skills centrally.
4. Install it through your internal provisioning or packaging workflow.
5. Download the folder directly from GitHub and place it in your skills collection.

Install command or upstream instructions:

```
npm install smartcrop
```

## Documentation

- https://github.com/jwagner/smartcrop.js

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/auto-crop-images-around-the-most-important-subject-before-generating-thumbnails/)
