Update: I found function that does the trick - printRandomImages(1, null, 'all', '', custom_height, custom_width);
However, the problem is I can't get how to include it in wordpress.
Just requiring zp-core/template-functions.php doesn't work - zenphoto complains about database error