/Engine/Source/Runtime/Engine/Classes/Engine/Texture.h
Downsize the 2D Image with the build setting of the texture. Try to get as close as it can to the target resolution but it will stay above it if it can reach it
bool DownsizeImageUsingTextureSettings ( const [ITargetPlatform](API\Developer\TargetPlatform\Interfaces\ITargetPlatform) * TargetPlatform, [FImage](API\Runtime\ImageCore\FImage) & InOutImage, int32 TargetSize, int32 LayerIndex )