The icon will be sourced from the Atlassian Marketplace; the icon that you uploaded there for your app listing. That is why this will not work for development apps; because there is no Atlassian Marketplace listing for your app yet.
You can take advantage of icon property in repoPage for that. It would look something like this:
Actually, that does not seem to work.
There is the following description of my page. When removing the icon definition, it works out of the box. I tried to find any definition of the JSON schema but did not find anything available online.
Though this is the right idea, your app needs to be listed in the Bitbucket Marketplace, rather than the Atlassian Marketplace, to customize the icon for your app (the two marketplaces are separate entities but we’re working on consolidating them).
Custom icons for modules are currently broken, but there is work being done to fix it. I’ve raised a public issue here to track the bug.
Also, these pages are helpful to reference when building a Bitbucket Connect app:
The functionality just broke again. There is how I use the icon. When I specify the icon, the app cannot be installed. When I remove it, the app can be installed again.