Images: Rearrange trim function.