Since 5.19 its not automaticaly assigning body pictures when firsty selecting or when using random portrait button
Viewing post in Improved Random Portraits v1.0
I haven't tested it with 0.5.19 yet. Unfortunately the mod is probably fairly version specific if they're going to keep changing the code the mod applies to.
Edit: Just downloaded 0.5.19, applied the mod, no unexpected errors seen. Ran game again, did a quickstart, starting slave got a random portrait as expected, and random portrait button works. Same with slaves at slave trader.
Will need more information to know what's going wrong for you. Are you starting a new game to test this? Are you applying any other mods? What errors show up on the console? (there's always some that aren't actually a problem, but some might indicate what's going wrong). You can run the game from a command prompt and then the errors persist after the game closes.