Skip to content

[Feature request] Add optional attributes parameter to setImage #615 #618

@weiningtry7

Description

@weiningtry7

Description

Hi! Thanks for the awesome library.

I noticed that setMention supports an optional attributes?: Record<string, string> parameter, which is super useful. However, setImage currently doesn't support this.

Use Case

I need to distinguish between different types of images in my application (e.g., distinguishing a standard user-uploaded image from a custom system sticker/emoji, or adding custom layout metadata like align: center).

Having an attributes parameter in setImage would allow us to pass custom metadata seamlessly.

Proposed API

setImage: (
  src: string, 
  width: number, 
  height: number, 
  attributes?: Record<string, string> // <-- Add this
) => void;

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions