Resizing images

When I pull on the corner of an object to resize it, sometimes it does so keeping the opposite corner it its place, sometimes the center. I can’t work out how I can control which one it does?
Thanks for help, Stefan

Select your object, click CTRL & SHIFT, then you can resize in one direction