Page MenuHomePhabricator

Make Thumbor logic in thumb.php more reusable
Open, Needs TriagePublic

Description

thumb.php has some mostly-Wikimedia-specific logic for generating thumbnails (in wfProxyThumbnailRequest()) that is needed in other thumbnail-generating situations as well (e.g. T355309: Don't use RENDER_NOW when generating thumbnails for PhotoDNA scans). It should be factored out into something accessible from File, or maybe it should just happen when File::transform() is invoked in a way that triggers rendering.

The nice thing to do would be to introduce some sort of ThumbnailRenderer abstraction, which by default is implemented via media handlers, but can be replaced with an external-service-based implementation.