Skip to main content

Image Box: Fixing aspect ratio issues in Img mode

In Img mode, image boxes adjust flexibly while keeping their aspect ratio. However, setting both height and width to fixed values like px can cause the aspect ratio to break.

Tip: Box mode and Img mode for image boxes

Image boxes have two modes—"Box mode" and "Img mode"—and the way images are handled and the available settings differ depending on the mode.

For more details, see the Image Box: Box Mode and Img Mode page.

Cause

In Img mode, you can resize images while keeping their aspect ratio. However, if you set both the height and width to fixed values (such as px), the aspect ratio may become distorted.

Solution

If an image in Img mode appears unnaturally stretched or squished, setting either the width or height to "auto" may fix the issue.

How to change an Img mode image size to auto while keeping the aspect ratio

You can do this in either of the following ways:

  1. Drag one of the handles on the edge of the image box to resize it.

  2. Double-click an edge of the image box.

When you do this, the edge opposite the one you clicked will automatically be set to auto.

Did this answer your question?