added image resize, not working properly