optimize ImageFitting and Pinterest