merged init, resizes images