Created on 22 April 2024, 9 months ago

Problem/Motivation

The current state of the solution is based on some hacks on Core and CROP, with some evolution on theses elements, the whole integration will be "cleaner".

Proposed resolution

1. Make ImageStyleDownloadController easily extendable

- Find a way to "split" some control elements out of the "deliver" method into protected methods in order to more easily extends the method.
- exemple : L114-125 => check for scheme throwing NotFoundHttpException, can be a protected method out side of the deliver method

2. Provide to core a way to manage contextuals derivatives (useless without crops)

On ImageStyleInterface and ImageStyle class
- Add an optional string parmeter "context" on the "createDerivative" method, this parameter will be passed to effects.

On ImageEffectInterface and subclasses
- Add an optional string parmeter "context" on the "applyEffect" method (get from ImageStyle::createDerivative method)

3. Better intergration with CROP

On Crop API & plugins
- Add an optional string parmeter "context" on the Crop::findCrop method, in order to load contextual CROP (currently : context = crop_id)
- In applyEffect method on Effect Plugin Classes, send the "context" to the Crop::findCrop method

4. Find a standard way to manage Contexts

On CropEntity
- Find a better way to "encode" the context (not using the crop_id anymore) that will use as less resources as possible on crop search/load, and not a long hash (to have the "cleanest" filename).

🌱 Plan
Status

Active

Version

2.1

Component

Code

Created by

🇫🇷France DrDam

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

Comments & Activities

Production build 0.71.5 2024