ensure we don't overflow width on huge images