Updated the image processing with more complex schema