Fix regular expression for image detection.