Image & Video APIs

How to always upload a square image

Last updated: Jan-20-2026

When uploading images to Cloudinary you can specify the dimension and crop on upload.

Steps to follow when uploading from the UI or client-side:

  1. Create an upload preset. Navigate to the Upload presets page and click on Add upload preset.
  2. Select Transformations and specify the dimensions as an incoming transformation in terms of the width and height of the image.

    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 image. You can find more information about gravity here.

    Note: The above video shows the older version of the upload preset settings.

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

Tadaa.. images uploaded now automatically get cropped square:

Example:

Original Image: Original Image

Square cropped image: Square cropped image

This can also be achieved using the API by specifying the incoming transformation on upload. Here's a short video on using incoming transformations:

✔️ Feedback sent!

Rate this page:

one star two stars three stars four stars five stars