Overview

The src property for image doesn't accept uri-reference (like public://, private:// etc.) The src property for image is mapped with src_with_alternate_widths prop. See here:
https://git.drupalcode.org/project/canvas/-/blob/1.x/src/Hook/ShapeMatch...
And the prop src_with_alternate_widths has a constraint validation that uri scheme must be http or https. See here: https://git.drupalcode.org/project/canvas/-/blob/1.x/src/Plugin/Field/Fi...

Proposed resolution

User interface changes

Issue fork canvas-3555154

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

utkarsh_33 created an issue. See original summary.

utkarsh_33’s picture

Status: Active » Needs review
vishalkhode’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed changes, looks good to me. Also, verified and can confirm that I don't see an error log, when asking AI to Create an image component. Hence, marking as RTBC.

tedbow’s picture

  • tedbow committed a99cbce6 on 1.x authored by utkarsh_33
    feat: #3555154 Canvas AI: Update the image's src prop to use latest...
tedbow’s picture

Status: Reviewed & tested by the community » Fixed

🎉 Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.