> ## Documentation Index
> Fetch the complete documentation index at: https://cloudinary.com/documentation/llms.txt
> Use this file to discover all available pages before exploring further.

# How to always upload a square image


When uploading images to Cloudinary, you can use an upload preset with an incoming transformation to define the dimensions and crop the asset to a square on upload before storing it in your account.  This enables you to normalize all assets that are uploaded using that upload preset. 

## Defining an incoming transformation for your Media Library uploads:
Steps to follow when uploading from the Cloudinary Console UI:

1. Create an upload preset. Navigate to the [Upload presets page](https://console.cloudinary.com/app/settings/upload/presets) and click on **Add upload preset**.
2. Select **Transform** and specify the dimensions as an **Incoming transformation** in terms of the width and height of the asset.
  
  In this example, We've taken a square of dimension 500 with gravity `auto` so that it crops and focuses on the main part of the asset. You can find more information about gravity [here](https://support.cloudinary.com/hc/en-us/articles/360024950012-How-to-Apply-Gravity-Based-Crops-on-Images-with-Cloudinary). 
  
    > **NOTE**: The above video shows an older version of the Upload Preset Settings.

3. Once saved, you can set the new preset as your default Media Library preset (for images, videos, or both) through the **Manage Defaults** option, or in case you are uploading from the client side, use this preset as the unsigned upload preset.

Your uploaded assets now automatically get cropped as a square:

Example:

Original Image: ![Original Image](https://res.cloudinary.com/demo/image/upload/v1678871120/docs/image1.png "with_code: false, with_url: false, thumb: w_500,dpr_2, width: 500")

Square cropped image: ![Square cropped image](https://res.cloudinary.com/demo/image/upload/v1678871120/docs/sneaker22.png "with_code: false, with_url: false, thumb: w_300,ar_1,c_fill,dpr_2, width: 300")

Here's a short video on using incoming transformations:

[//]: # (TBD - Update the video for the new UI)

> **NOTE**: The above video shows an older version of the Console Settings UI.

## Normalizing your uploaded images programmatically:

You can also normalize uploaded images programmatically by applying an incoming transformation directly in an upload call or by passing it as a parameter to the upload preset and then specifying the upload preset in the upload call. 

For details, see [incoming transformations](eager_and_incoming_transformations#incoming_transformations).

