New Community Node: Image Aspect Ratio Cropper — Pixel-Perfect Cropping for AI Images

Hi everyone! :waving_hand:

I’m excited to share my new community node — n8n-nodes-image-aspect-ratio-cropper — a tool for cropping images to exact aspect ratios using center-cover mode.
npm: Image Aspect Ratio Cropper

:thinking: The Problem

Have you noticed that AI image generators (like :banana: Nano Banana) don’t always return true aspect ratios?

For example, when you request 16:9, you might get 2752×1536 — that’s actually 1.79:1, not 1.78:1 (true 16:9). This ~0.8% drift causes visible issues in:

  • Video thumbnails (black bars or cropping)

  • Social media posts (unexpected cuts)

  • Print materials (alignment problems)

:bullseye: The Solution

I built this node to solve this problem with mathematically precise cropping:

:white_check_mark: : Smart Detection — Automatically skips processing if image already matches target ratio

:white_check_mark: : Pixel-Perfect Output — Integer-based algorithm guarantees exact ratios

:white_check_mark: : Center-Cover Mode — Maximizes retained image area

:white_check_mark: : Format Flexibility — JPEG, PNG, WebP, GIF, TIFF, SVG support

:hammer_and_wrench: Installation

  1. Go to SettingsCommunity Nodes

  2. Select Install

  3. Enter n8n-nodes-image-aspect-ratio-cropper

  4. Agree to the risks and select Install

:link: Links

:clipboard: Quick Example

https://github.com/LinkAIBrain/n8n-nodes-image-aspect-ratio-cropper/blob/main/workflows/sample-workflow.json

:wink: Feedback Welcome!

This is my first n8n community node, and I’d love to hear your thoughts! Bug reports, feature requests, and suggestions are all welcome.

Has anyone else run into aspect ratio issues with AI-generated images? I’m curious about your use cases!

Thanks for being such an awesome community! :tada:

1 Like