Canvas Tip Clarifies Image Props in Drupal SDCs

Inline Schema Preserves Canvas Widget Support and SDC Portability
Codes

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.

Disclosure: This content is produced with the assistance of AI.

Disclaimer: The opinions expressed in this story do not necessarily represent that of TheDropTimes. We regularly share third-party blog posts that feature Drupal in good faith. TDT recommends Reader's discretion while consuming such content, as the veracity/authenticity of the story depends on the blogger and their motives. 

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please reach out to us at #thedroptimes channel on Drupal Slack and we will try to address the issue as best we can.

Related Drupal Initiatives

Upcoming Events