Add image preprocessing