Figma Support Forum

Reset bounding box to "Fit" image fill size?

Is there a way to reset the bounding box of an object to match the size of the image fill (set to “fit”) within it?

The main effect I’m trying to deal with is when I go to export the image it does not trim the transparent pixels. I managed to get the bounding box of the object out of alignment with the image fill when scaling, and can’t figure out a way to get them resynced without just sort of eyeballing it, which just feels a bit imprecise.

I’m looking for one of two options ideally (unless there are others), either some way to snap the bounding box to the image within it, or to auto resize the bounding box to the exact dimensions of the image fill within it.

FYI, I did find the “Restore Image Dimensions” plugin, which can be used as a workaround, but this also resets the scaling, which is… not ideal.

Thanks for any help.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.