T105789 (panoramic viewer) and some other uses of deep zoom will benefit from having support for generating tiles from large images. I strongly recommend using the IIIF Image API for exposing such tiles; this would also make it easier to reuse Wikimedia Commons images in IIIF Presentation API manifests which may be of interest.
Some features of IIIF Image API include rotation and bitonal variations which we would probably not support. This can be described in the manifest file for the service, I believe.
See also T173346 for general IIIF+Structured Data on Commons ideas.
Could be implemented as a RESTBase-like service, or an API endpoint or Special page hack, or a "404 handler" hack that integrates with Thumbor etc. Not sure best way to proceed at this time, but I may prototype with a Special: page hack to get something working.