Nodes/ComfyUI-BCNodes/Social Media Export
ComfyUI Node

Social Media Export

Social Media Export — Stop Letting the Platform Crop Your Crop

By 0xBeycan·Created 24 days ago·Updated 4 days ago· 2
Social Media Export
  • images
  • images
  • report
◄instagram_feedtrue►
◄instagram_storytrue►
◄x_timelinefalse►
◄tiktok_photofalse►
◄tiktok_verticalfalse►
◄pinterest_pinfalse►
◄facebook_feedfalse►
◄facebook_storyfalse►
◄threads_feedfalse►
◄blueskyfalse►
◄redditfalse►
◄resize_modecrop►
◄quality92►
◄allow_upscalefalse►
◄filename_prefixsocial/export►

Why you'd bother

You finish a portrait, save the master, upload it to Instagram, and Instagram crops it. Your carefully placed subject is now off-centre, or the top of a head is gone, or a full-body shot is a tight headshot. Then it recompresses what's left, on top of whatever your save node already did.

This node exists to take that decision away from the platform. It takes your master and - for every platform you tick - writes one derivative already at that platform's shape and size, encoded well enough that the platform has no reason to touch it. Your master is untouched; you wire the same image into your normal save node and into this one.

What it actually does

Each platform is defined as an aspect-ratio band inside a pixel envelope, not a single fixed size, and those rules live in a JSON file the node re-reads on every execution:

  • If your image's shape already falls inside the platform's allowed ratio range, nothing is cropped - it's scaled to fit the envelope.
  • If it doesn't, resize_mode decides: crop trims the minimum off one axis, or pad keeps every pixel and fills the gaps with a blurred, cover-scaled copy of the image itself. crop gives you a clean full-bleed image; pad guarantees nothing is lost at the cost of soft bars.

Encoding is deliberately boring and good: 4:4:4 chroma (no colour subsampling artifacts), progressive encoding, and a slightly top-weighted crop anchor - always on, not exposed as options, because there's no better answer. quality (default 92) is the starting JPEG/WebP quality; platforms with a byte cap step it down until the file fits.

You get images back - the master, passed through untouched - and report, a plain text line per image-and-platform pair telling you exactly what was written. Files land under output/ as <filename_prefix>_<platform>_00001_.<ext>, with the default prefix social/export.

The inputs that matter

images, then the twelve platform checkboxes. instagram_feed and instagram_story are ticked for you; x_timeline, tiktok_photo, tiktok_vertical, pinterest_pin, facebook_feed, facebook_story, threads_feed, bluesky and reddit are off. Each tooltip gives you that platform's ratio band and pixel ceiling, so you don't have to guess what "TikTok Photo" means.

Then three real decisions: resize_mode (crop or pad - the only aspect-ratio choice you make), quality (92 is visually lossless; lower it only for file size), and allow_upscale (off by default, and staying off is the quality-safe answer - the node won't enlarge a small master just to hit a platform's recommended size). filename_prefix is where the files go.

It's an output node: no downstream wiring, and it runs every time you queue. That's the correct design for a save node and a mild annoyance if you're mid-iteration and don't want a folder of derivatives yet.

Install

Manager: search ComfyUI-BCNodes, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/0xBeycan/ComfyUI-BCNodes

No pip step for this node - the pack's requirements.txt only covers the PostFx and Caption Audit nodes. Type BCNodes in the node library; it's under BCNodes/image.

Where people get burned

The crop anchor is top-weighted on purpose, and that cuts both ways. It keeps faces and subjects in frame for portrait crops, which is right far more often than it's wrong - but on an extreme shape change (a very wide image into a story format) you can still lose something you wanted. Check the report and the files before you post, especially the first time you use a platform.

pad doesn't crop, and it also doesn't hide. The bars are a blurred copy of the image rather than black, so they read as intentional in a grid - but they are bars. If you hate them, you want crop plus a composition that survives being trimmed.

It writes files on every queue. Twelve ticked platforms times a batch of eight images is ninety-six files per run. Tick only what you're posting to.

The specs are editable and that's a real feature. A platform changes its recommended size roughly monthly, so the JSON is re-read each execution with no restart needed. Edit it if your platform differs - but it's your responsibility after that, and there's no validation that will catch a nonsense entry before it mangles a crop.

CategoryBCNodes/image

Inputs (16)

NameTypeDefaultDescription
imagesIMAGE—
instagram_feedBOOLEANtrueInstagram Feed — 0.8–1.91 aspect (w/h), up to 1440×1800px, JPG.
instagram_storyBOOLEANtrueInstagram Story — fixed 0.5625 aspect (w/h), up to 1080×1920px, JPG.
x_timelineBOOLEANfalseX Timeline — 0.75–2 aspect (w/h), up to 2048×2048px, JPG.
tiktok_photoBOOLEANfalseTiktok Photo — 0.4545–2.2 aspect (w/h), up to 1080×1920px, JPG.
tiktok_verticalBOOLEANfalseTiktok Vertical — fixed 0.5625 aspect (w/h), up to 1080×1920px, JPG.
pinterest_pinBOOLEANfalsePinterest Pin — 0.476–0.6667 aspect (w/h), up to 1000×1500px, JPG.
facebook_feedBOOLEANfalseFacebook Feed — 0.8–1.91 aspect (w/h), up to 1440×1800px, JPG.
facebook_storyBOOLEANfalseFacebook Story — fixed 0.5625 aspect (w/h), up to 1080×1920px, JPG.
threads_feedBOOLEANfalseThreads Feed — 0.01–10 aspect (w/h), up to 1080×1920px, JPG.
blueskyBOOLEANfalseBluesky — 0.5–2 aspect (w/h), up to 2000×2000px, JPG.
redditBOOLEANfalseReddit — 0.5–1.91 aspect (w/h), up to 1200×1600px, JPG.
resize_modeCOMBOcropHow to reach each platform's shape when your image doesn't fit: • crop — trim the edges to fill the frame (no bars; may cut a little off) • pad — keep the whole image, filling the rest with a blurred copy (nothing is cut; adds soft bars). Either way the platform gets an image it won't re-crop.
qualityINT921–100JPEG/WebP quality. 92 is visually lossless; lower it only if you need smaller files. (If a platform has a byte cap, quality auto-steps down.)
allow_upscaleBOOLEANfalseEnlarge small images up to the platform's recommended size. Off = never upscale (safest quality).
filename_prefixSTRINGsocial/exportOutput name prefix. One file per selected platform is written under ComfyUI/output (e.g. social/export_instagram_story_00001_.jpg).

Outputs (2)

NameTypeDescription
imagesIMAGE—
reportSTRING—