I've set up a custom domain which properly takes me to my bitbucket content. I also have a wiki page with an image. The image was uploaded to bitbucket via git (as described in the docs).
If I access bitbucket via my custom domain (code.mydomain.com), the image doesn't appear on the wiki page - it's broken. If I access it directly using the bitbucket domain (bitbucket.org/myaccount/...) the image appears correctly.