Canvas Tip Clarifies Image Props in Drupal SDCs
Drupal component authors can define image properties for Drupal Canvas without making their Single-Directory Components dependent on the module. Drupal contributor Christian López Espínola explains the approach in Canvas Tips&Tricks: Declaring Images in SDCs, published 18 July 2026. He says a Canvas-specific schema reference was needed during alpha development but was no longer required before the 1.0.0 release.
Component authors can instead use a standard JSON Schema definition for the image source, alternative text, width, and height. Canvas recognises that structure and provides the appropriate image widget in its editor. The component does not need to reference canvas.module.
The distinction allows an SDC to retain Canvas editing support while remaining reusable on Drupal sites where Canvas is not installed. Canvas issue 3515074 documents the change that enabled Canvas to recognise equivalent resolved schema definitions. Christian asks contributors to report documentation that still recommends the older module-dependent declaration.


