Skip to content

Allow setting crossOrigin prop on Image component #8531

Closed
@mofojed

Description

@mofojed

Provide a general summary of the feature here

Image component should allow setting the crossOrigin attribute.

🤔 Expected Behavior?

Should be able to set the crossOrigin attribute on an image: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/crossorigin

😯 Current Behavior

You cannot set the crossOrigin attribute on an Image component. You would need to use the raw img element instead.

💁 Possible Solution

As it is right now, you cannot set the crossOrigin attribute using the Image component - you may get a CORS error if you're referencing an image from another server.

🔦 Context

We allow users to generate their own UIs based on Python code, which maps to Spectrum components. The Image component used does not allow crossorigin attribute to be set on the img tag, so when their server has the Cross-Origin-Embedded-Policy set, those images do not always load.

Similar to this ticket: #3404
But for the crossOrigin attribute instead of the loading attribute.

💻 Examples

No response

🧢 Your Company/Team

Deephaven

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions