Search template
Replace images with data imgs and cleanup templates