Make the image smaller before constraining

These avoids the memory error on the CI boxes.