Are heightmaps resized or cropped to fit terrain size?

For example, you have a heightmap of 2049x2049 pixels, such as is used in Unity.

A UE4 recommended terrain size close to that is 2017x2017.

UE4 indeed allows the importing of a heightmap not matching its terrain size,

but

will it scale the 2049x2049 heightmap down to 2017x2017 (saving me doing it in Photoshop), or will I lose data off the sides of the heightmap?

Some brief experimentation has shown that upon creating a terrain from an imported heightmap, UE4 doesn’t scale the supplied heightmap to match the number of terrain vertices.

It may crop or it may just take the first 2017x2017 values and discard the final 130112 that a 2049x2049 heightmap has.

Resizing the 2049x2049 heightmap in Photoshop to 2017x2017, then importing definitely shows a shift compared to importing the 2049x2049 heightmap directly, even though both terrains have 2017x2017 vertices.

And finally, I note that after initially creating the terrain from the heightmap, reimporting a heightmap that doesn’t match the number of vertices has UE4 indicate this mismatch and refuse to import.

Conclusion: Resize in Photoshop prior to match.