move photo cropping to backend