You are right, GAE and Cloud SQL would provide an easy and elegant solution. You just need to check relevant documentation, or, even better: follow an example. The "Using Cloud SQL for MySQL with PHP" documentation
page offers such an example. Even better, you may follow the
entire example. The Cloud Storage Tools API provides convenience methods that you can use to serve image files conveniently. You may gather more detail on the "Serving Images"
page.