Skip to content

Avatar images srcset #147

Closed as not planned
Closed as not planned

Description

@BraunreutherA

Hey there,

thanks for this awesome library! I think it'd be cool to give an option to put the bot and user avatar image as srcset to not have better performance.

Activity

  1. LucasBassetti commented on Oct 27, 2018

    @LucasBassetti
    Owner

    I think is better have a better performance, isn't?

  2. BraunreutherA commented on Oct 31, 2018

    @BraunreutherA
    Author

    Sry yes i meant to have a better performance. With src set the browser could select the image in the correct resolution / size.

  3. pascalgagneur commented on Mar 17, 2019

    @pascalgagneur
    Contributor

    @BraunreutherA would dpr option be enough?

    <img srcset="elva-fairy-320w.jpg,
                 elva-fairy-480w.jpg 1.5x,
                 elva-fairy-640w.jpg 2x"
         src="elva-fairy-640w.jpg" alt="Elva dressed as a fairy">

    https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images#Resolution_switching_Same_size_different_resolutions

    A possible solution to implement would be:

    <ChatBot botAvatar={{ src: 'bot'.jpg, srcSet: 'bot.jpg, bot2x.jpg 2x' }} />
  4. LucasBassetti commented on Sep 26, 2026

    @LucasBassetti
    Owner

    Workaround: pass a data URL or a single high resolution image in botAvatar/userAvatar, and style it with avatarStyle.

    This is not part of the maintenance pass in #392, and the project is not adding new features, so I'm closing it. Thanks for the suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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