howtoUpdated 10/28/2026

Fit any product into a white marketplace frame without cropping

Portrait, square and landscape shots all need the same clean square canvas. Learn a fit-and-pad workflow that keeps the whole product and adds a real safe margin.

Fit any product into a white marketplace frame without cropping
62-second overview: fit a portrait or landscape product into 2000/1600/1200 white canvases

The real problem with a square canvas

Marketplaces ask for a square, but the shoot rarely cooperates: a mug is portrait, a shoe is landscape, a gift box is nearly square. Scaling straight to 2000×2000 stretches the product; a center crop clips the handle or the toe.

The correct move is two steps: scale proportionally so the whole product fits inside a box, then center that box on the square canvas and fill the rest with white.

Source product shot
Sample input: a 1200×900 transparent product shot

Why a 10% margin

The 10% margin is a layout choice in this workflow, not a universal marketplace standard. Preview the final thumbnail in the actual store theme and placement to see how it crops.

This workflow constrains the product to a 1600×1600 box and places it on a 2000×2000 canvas, so the outer margin is at least 200 px — 10%.

The product box spans at most 80% of the canvas edge, and source padding makes the actual subject smaller. Amazon's official photography guide recommends at least 85% coverage. Do not treat this default export as an Amazon-compliant main image; adjust the subject scale and check the category rules first.

2000 white canvas
2000×2000: whole product, clean margin

Three sizes in one run

  • 2000×2000: padded display image, 1600 product box
  • 1600×1600: detail page and storefront card
  • 1200×1200: listing thumbnail and email asset

All three share the same scale chain, so the ratio and margin stay consistent; the main image cannot look right while the thumbnail touches the edge.

1600 output
1600×1600: margin scales with the canvas

Node order

  1. 1LoadImage reads the product
  2. 2InvertMask recovers the product alpha (ComfyUI's MASK is inverted alpha)
  3. 3MaskToImage turns alpha into a black-and-white image
  4. 4ResizeAndPadImage fits the product into a 1600 box with black padding
  5. 5ImageToMask recovers the scaled alpha
  6. 6ResizeAndPadImage scales the source image the same way
  7. 7EmptyImage creates the 2000×2000 white canvas
  8. 8ImageCompositeMasked places the product at (200,200) using the alpha from step 5
  9. 9SaveImage; two more ResizeAndPadImage nodes emit 1600 and 1200

Steps 4 and 5 must use the same target size. If they drift, the mask and the product no longer line up and you get a white or black fringe.

Common issues

A black fringe around the product? The mask did not follow the same resize. Check that the ResizeAndPadImage after MaskToImage uses the same dimensions as the image chain.

The product looks too small? The source has too much transparent padding. Trim to the product bounds in an external tool before running; this workflow adds margins, it does not remove excess transparency.

The background is not pure white? The output uses the EmptyImage white (#FFFFFF). If the marketplace asks for pure white, export as-is; no extra background cleanup is needed.

Related workflows

Related guides

If you also need a scene shot, finish the background composite first and add the white frame last. Doing it in the other order shrinks the whole scene and makes the subject look smaller than it is.

Workflows used in this guide

Check the version's test records and delivery status. Online trials are available only when enabled.

Keep reading