I migrated a website from SP2010 to SP2016 (not directly, used 2013 in between). After I mounted and upgraded the content database on the customer's system an error was shown and the site (http://site) did not load: Invalid URI: The URI is empty.
Stacktrace showed that it could not load the user profile picture (althought I am 99% sure that no user had any picture). A search in 'the internet' revealed that I must deploy a MySite and configure the MySite Host URL in the User Profile Service Application. I checked the SP2010 site and indeed they had a MySite (Host) configured but not really used. But this seems to now make the MySite mandatory.
Then I deployed the MySite but to an additional WebApplication (I created for other testing purposes) under the URL "http://site2/my" (using the managed path "/my"). After an IISReset the site (http://site) showed correctly and also showed the placeholder image for my user. It uses the following control to render the profile picture:
<SPSWC:ProfilePropertyImage runat="server" ImageSize="Large" ShowPlaceholder="true" ID="Picture" PropertyName="PictureUrl"></SPSWC:ProfilePropertyImage>
After doing other stuff on the site, I wanted to clean up the mess and move the MySite over to the correct WebApplication under URL "http://site/my", so I deleted the WebApp "http://site2", then created a "MySite Host" under "http://site/my" and changed the "MySite Host URL" in the User Profile Service App to the new address (http://site/my).
After another IISReset the site loaded but now it showed no user profile picture - it should show the placeholder image as before. No other code has changed. When I change the "MySite Host URL" again back to "http://site2/my" - a site that no longer exists, as the WebApplication has been deleted - the placeholder image is shown again.
It seems like somewhere in the content database now is an entry that points to the wrong URL, but I search each column in each table and there is no entry with the old URL. I also recreated the User Profile Service Applciation and reconfigured the sync to Active Directory (re-run the sync job) but the user profile picture (placeholder) still is not shown.
Btw, I also uploaded a picture late for my profile and run the Update-SPProfilePhotoStore command with the flag to generate thumbnails (which it did), but the picture is also missing in this case.
Any ideas how to fix this mess?