add api and image reszing