Find an image that you like and crop it to make your character really special
For player character portraits only one file is now required, but I will ask you to crop two sizes (the large one and the thumbnail), the file ending is not important (S, M & L are all fine). Any size of up to 1024px works in theory, but to assure that the image doesn't become blurry it should be a minimum of 169x266px and the side ratios need to be the same as the ones mentioned above, otherwise the portrait will be distorted. It needs to be a .bmp in 24 bit colour depth and goes into the 'portraits' folder in the documents folder of the desired game (i.e. C:\Users\[Your Username]\Documents\Baldur's Gate 2 - Enhanced Edition\Portraits).
Replacing companion portraits works just the same as in the originals. The override folder is also in the game's installation directory (i.e. C:\Program Files\BeamDog\Games\Baldur's Gate 2 - Enhanced Edition\Override)