add js for image resizing