Here is the code snippet I'm currently using:
<img ng-show="json.user.picture" ng-src="{{json.user.picture}}" ng-error="json.user.picture = false">
When accessing an image from an external website without permission, a 404 error code is returned. In order to prevent showing the broken image, I have implemented the code above which works effectively. However, there is still a brief moment where the broken image is displayed. How can this be eliminated?
There seems to be a slight delay between ng-show and ng-hide which results in the broken image being shown momentarily. Any suggestions on how to fix this?