Use $content_width global (defined in functions.php) for attachment image size.

The image can’t actually be larger than this anyway, so why were we
loading a 1200x1200 image?