Add more graceful fallback for image files that have no / invalid dimensions