Skip to Main Content
Builder.io Ideas
Status Shipped
Created by Ersin
Created on Dec 16, 2021

Button to reset image's intrinsic aspect ratio

A button that resets an image's aspect ratio to its intrinsic aspect ratio.

Would be helpful when replacing an image inside of an image block that has a different aspect ratio, then the aspect ratio gets messed up and there's no way to get it right without eyeballing.

The only way to get the natural aspect ratio at the moment is to delete the old image block and insert a new one. Don't forget to copy the styles before deleting the old one or else you'll have to redo it--tedious!

Examples:

  • If an image is 200px x 200px, its intrinsic aspect ratio is 1.

  • If an image is 400px x 200px, its intrinsic aspect ratio is 0.5.

  • If an image is 200px x 400px, its intrinsic aspect ratio is 2.

ADDENDUM: Add an option to an image block, "Keep aspect ratio when changing image", that's checked by default (opt-out). When checked, replacing the image will keep the old aspect ratio and the user will have to click the reset button described in this idea to get the new intrinsic ratio. When unchecked, replacing the image will also replace the block's old aspect ratio with the intrinsic ratio from the new image.

  • Attach files
  • Logan
    Reply
    |
    Jun 21, 2022

    This is solved! Builder now updates the aspect ratio for you when uploading a new image in the same image block.