Hi @istvan,
To activate image upload and gallery creation, we recommend that you activate rtMedia for WordPress, BuddyPress and bbPress (https://fr.wordpress.org/plugins/buddypress-media/) as we did on our demo.
Unfortunately, we have no idea how you could limit to 4 images per profile. It’s best if you try to reach the plugin authors. They will be more informed and better suited to help you.
To go further, we invite you to post your request on their support forums:
https://wordpress.org/support/plugin/buddypress-media/
We remain available for all support requests related with the use of your theme.
Best,