Refactor ImageStyleDownloadController so derivatives can be generated by contrib modules

Created on 11 March 2016, over 8 years ago
Updated 4 September 2024, 4 days ago

In order to support alternative stream wrappers like S3 and maintain performance, contributed modules often have to reimplement significant parts of the image generation process. For example, with S3 we want to first serve an image locally, and then upload it in the background to mask the several seconds it takes to upload an image.

This patch takes the bare minimum approach, and refactors deliver() into several protected methods. This significantly simplifies the implementation for the Flysystem module, and helps avoid bugs in image token and request validation.

A more complete approach would be to refactor most of the new methods into a separate class that can be unit tested, decoupling generation from a Request object. It looks like that's underway over at #2359443: Allow creating image derivatives from an Image object , though that patch doesn't address the issues with the deliver() method.

Feature request
Status

Needs work

Version

11.0 🔥

Component
Image system 

Last updated about 11 hours ago

Created by

🇨🇦Canada deviantintegral

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024