Hi,

in Drupal 7, modules can define functions like

function image_gd_mymodule_mymethod($image, $data = array()) {
  ...
}

that can then be invoked like

  $result = image_toolkit_invoke('mymodule_mymethod', $image, array(...);

In this way, contrib modules can 'extend' the image toolkit with additional image mgmt methods. This is the case of e.g. 'imagecache_actions' module, and I used this logic for Textimage 7.x-3.x.

What would be the best approach to get to this now in D8, with image toolkits being converted to plugins? I would not like to create a separate plugin just to add more methods to the standard gd toolkit, just 'extend' it with the more methods I need, in a way that also other modules may add theirs on top of the same standard one.

Thanks for thoughts.

Comments

mondrake’s picture

Status: Active » Closed (duplicate)