Advertising sustains the DA. Ads are hidden for members. Join today

On this page

Basic idea

Last updated on
30 April 2025

Basic structure

Basic API structure is shown on image. Most important parts of API are:

  • Engines: responsible for physical creation of derivatives. Engines are implemented as own modules. API itself does not implement any engine functionalities, it only provides hooks for them.
  • Conditions: their responsibility is to decide, if a given file should be derivated with a given preset at a given time. Few basic conditions are implemented in API itself. Hooks are provided to allow custom modules to implement own custom rules.
  • Events: events are executed when a file's derivative should be created. API implements two basic events, that are executed when a file is uploaded and when a file was added to a file/media/image field. Hooks are provided, that allow other modules to provide custom triggers.
  • Presets: presets are responsible for configuration, that is used to create a derivative of a given file. Presets are based on CTools export API. Presets can be defined in code or in UI (and later exported to code/feature)
  • Schedulers: scheduler's responsibility is to run derivation of a file at the right time. API currently implements three simple, time-based schedulers. Hooks are provided, that allow other modules to provide custom schedulers.

Derivative is saved in file_managed table if successfully created.

Help improve this page

Page status: Not set

You can: