Improve image detection on paste