adding image resizing and thumbnail