How to add an image property to an entity? I have a requirement to add a unique icon to each bundle of an entity. My entity code is very similar to the model module. I have 2 entities, one for holding the actual entity instances, another for holding the type information.

Each entity type will have a unique icon which will be shown while adding that entity in the creation form. For this, I need to add a custom property to the entity which will hold the image file data.
You need to create an integer property that references the fid column in the file_managed table.

For inspiration, check out the user_account_form() function (the picture element) and associated validate/submit handlers. They show the exact methodology you need to use.