Why does my crop box get smaller on its own when I type a large X value?

Because the tool keeps the exact position you typed, then fits the box into the space left before the image's edge. If there is not enough room for its current size, the box shrinks rather than leaving the image or ignoring your number. The fix is to type a smaller value, or to set the size first and the position second.

Published · 3 min read

An example in numbers

A photo measures 2000 × 2000, and the box in the Image cropper is a 1200 × 1200 square at X = 400, Y = 400, with the 1:1 ratio. You type 1500 in 'X from left (px)'.

Worked example

From X = 1500 to the right edge only 500 pixels remain, since 2000 − 1500 = 500.

The box cannot stay 1200 wide, so it shrinks to 500 × 500 to keep the 1:1 ratio.

With the 'Free' ratio only the width would shrink, giving 500 × 1200.

The same happens with Y: typing Y = 1500 on the original box also gives 500 × 500.

Why the tool works this way

When you type a position, you are telling the tool: I want the left edge exactly here. If the tool pushed the box back to protect its size, it would silently ignore the number you typed. So it honors the position and gives up size instead, and you see the change at once in the width and height fields and in the 'Output:' line.

The highest X you can type is the image width minus one pixel. Type 2000 on a 2000 px wide image and you see 'The value must be at most 1999.' with the download disabled.

A common trap: the box does not grow back

After the box has shrunk to 500 × 500, you may type X = 800 expecting it to return to 1200. It stays 500 × 500 at its new spot, because typing a position never enlarges the box; it only shrinks it when needed. To get the size back, type a width of 1200 again, and the box becomes 1200 × 1200 at X = 800.

Three ways to avoid it

  1. Work out the largest position that fits: image width minus box width. Here 2000 − 1200 = 800, so any X up to 800 keeps the box at 1200 × 1200.
  2. If you wanted a smaller box anyway, type the width first and the position after.
  3. Drag the box with your mouse or finger instead of typing: dragging moves it at its current size and stops at the image edge. Or focus the box and move it with the arrow keys.

If the box is completely lost

If the values are tangled and you no longer know where to start, press 'Reset crop box'. The box returns to the largest centered area at the chosen ratio, or to the middle 80% of the image with the 'Free' ratio, and you can begin again.

Common questions

Does the shrinking change my chosen ratio?

No. With a fixed ratio both sides shrink together and keep it, give or take one pixel of rounding.

Does the same thing happen when dragging?

No. Dragging moves the box at its size and stops at the edge instead of shrinking.

Why did X change when I typed a width?

The width field works the other way round: it keeps the size and moves the box if it does not fit from where it is.