substitute rect with images