Do not output any image sizes if no attachment id is returned for an image.
Corrects a problem with externally hosted images.