title: How do I get a TensorFlow/Keras model that takes images as input to serve predictions on Cloud ML Engine?
body: <p>There are multiple questions (examples: <a href="https://stackoverflow.com/questions/40849195/how-convert-a-jpeg-image-into-json-file-in-google-machine-learning">1</a>, <a href="https://stackoverflow.com/questions/45808595/deploying-keras-model-to-google-cloud-ml-for-serving-predictions">2</a>, <a href="https://stackoverflow.com/questions/50778471/inception-v3-to-take-base64-images-for-predictions-on-google-ml-engine">3</a>, <a href="https://stackoverflow.com/questions/47558050/retrained-inception-v3-model-deployed-in-cloud-ml-engine-always-outputs-the-same">4</a>, <a href="https://stackoverflow.com/questions/41261701/how-make-correct-predictions-of-jpeg-image-in-cloud-ml">5</a>, <a href="https://stackoverflow.com/questions/51218033/export-a-custom-keras-model-to-be-used-for-prediction-with-the-cloud-ml-engine/51386684#51386684">6</a>, etc.) trying to address the question of how to handle image data when serving predictions for TensorFlow/Keras models in Cloud ML Engine.</p>
  
  <p>Unfortunately, some of the answers are out-of-date and none of them comprehensively addresses the problem. The purpose of this post is to provide a comprehensive, up-to-date answer for future reference.</p>