> For the complete documentation index, see [llms.txt](https://minimateapps.gitbook.io/mini-image-upload-and-file-upload/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://minimateapps.gitbook.io/mini-image-upload-and-file-upload/how-to.../how-to-set-image-dimensions-and-cropping.md).

# How to set image dimensions and cropping

There are two separate rules that work together to control image quality and shape: **Image dimensions** (sets size restrictions) and **Image editor** (lets customers crop). You can use either one on its own or both together.

* Please go to the "Upload Rules" tab while creating a field
* Click "Add a rule" button

<figure><img src="/files/bRCX9KQAZDJwsfa4wIHq" alt=""><figcaption></figcaption></figure>

### **1. Image dimensions**

This rule restricts the pixel size of the images customers can upload.

* Under **File requirements**, select "Image dimensions"
* Enter the size limits you want to enforce:
  * **Minimum width** and **Maximum width** (in pixels)
  * **Minimum height** and **Maximum height** (in pixels)
* Customize the **error message** that appears when an uploaded image doesn't meet the requirements. The default is "Please check the number of files uploaded."

<figure><img src="/files/2qiWce8Egt3PTg3DwbSk" alt=""><figcaption></figcaption></figure>

**When to use**

* If you need print-quality images (e.g. set a high minimum width and height)
* If you want to block oversized images that slow down processing
* If your product requires a specific size range (e.g. for engraving or printing)

{% hint style="info" %}
&#x20;You don't need to fill in all four fields. Leave a field empty if you don't want to enforce that limit — for example, set only the **minimum width** and **minimum height** if you only care about image quality, not maximum size.
{% endhint %}

### **2. Image editor (Cropping)**

This rule lets customers crop their image directly in the upload field before submitting.

* Under **Customer experience**, select "Image editor"
* Choose the cropping behavior:
  * **Allow free-form cropping** — customers can crop to any shape or size
  * **Allow square-only cropping** — customers can only crop to a square
  * **Allow circle-only cropping** — customers can only crop to a circle
  * **Allow aspect ratio cropping** — customers crop to a fixed aspect ratio you define

<figure><img src="/files/ovvAL0NyIMYXVqfwz3OE" alt=""><figcaption></figcaption></figure>

**When to use**

* If you want customers to focus on a specific part of their image
* If you need consistent shapes for printed products (e.g. circular stickers, square prints)
* If you want to give customers more control over how their image appears

{% hint style="info" %}
Cropping happens on the customer's side before the file is uploaded, so the final file you receive will already be cropped to the selected shape.
{% endhint %}

{% hint style="warning" %}
If you combine both rules, make sure your **Image dimensions** limits match the cropping shape. For example, if you require "square-only cropping" but also set very different minimum width and height values, customers may struggle to upload an acceptable image.
{% endhint %}

#### 📹 Watch: Image Dimensions

See how to set minimum or maximum width and height for uploaded images — useful for print-on-demand and quality control.

{% embed url="<https://youtu.be/n7n2T2kc4CY?si=5FPdyjJ-pRLBQemQ&t=360>" %}
