resize of images and fix styles for templates that contains images