Don't iterate when there aren't image sizes
Merge pull request #1461 from wp-cli/fix-1459

Don't iterate when there aren't image sizes