# jwagner/smartcrop.js

Content aware image cropping

Repository: https://github.com/jwagner/smartcrop.js
Canonical: https://ross.abutalabs.com/products/smartcropjs
Homepage: http://29a.ch/2014/04/03/smartcrop-content-aware-image-cropping
Language: JavaScript
License: MIT
License Family: permissive
Topics: smartcrop, javascript, nodejs, image-processing
Last push: 2024-03-16T23:45:27+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4535, "days_push": 900, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 12955, forks 572 (observed 2026-08-28T04:11:00.241689+00:00)

## What it is
smartcrop.js is a JavaScript library that implements a content-aware algorithm to find good crops for images. It runs in the browser, in Node.js, or via a CLI, and returns the optimal crop rectangle for a requested width and height.

## Use cases
- automatically crop photos to thumbnails without cutting off faces
- generate smart square crops for image galleries
- crop user-uploaded images for social media previews
- create Ken Burns slideshow transitions from photos
- batch-crop images from the command line
- avoid center-crop failures in responsive image pipelines

## When to choose
- you need automatic, content-aware image cropping in JavaScript
- you want a lightweight, dependency-free algorithm that works in browser and Node
- you need to integrate cropping with sharp or GraphicsMagick in Node

## When to avoid
- you need ML-based face detection accuracy out of the box
- you work outside the JavaScript ecosystem
- you need full image editing rather than crop suggestions

## Facets
- artifact type: library
- maturity: stable
- function: image-processing, computer-vision
- domain: image-processing, web-development, computer-vision
- platform: browser, cross-platform, cli
- tags: smart-cropping, content-aware-crop, javascript, thumbnailing, nodejs

## Member repositories
- jwagner/smartcrop.js (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:00.241689+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:13:39.674645+00:00, confidence not recorded.
  - readme: https://github.com/jwagner/smartcrop.js (fetched 2026-08-28T04:11:00.241689+00:00, sha 37ed659ff31f)
  - homepage: http://29a.ch/2014/04/03/smartcrop-content-aware-image-cropping (fetched 2026-08-29T08:09:50.426576+00:00, sha e90ed80ae732)
  - site_page: https://29a.ch/about (fetched 2026-08-29T08:09:50.429064+00:00, sha ca92f7a30cb2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
