stream-chat-react
stream-chat-react copied to clipboard
Allow to add a spinner or placeholder when image is loading in the MessageList
Motivation It could be great to allow to add of a spinner or placeholder when the image is loading in the MessageList.
Proposed solution Currently, it is possible to create a custom Image component based on the GetStream Image component. It is great but the update cannot be propagated everywhere.
For example, we can create a custom Image component and pass it to the <Attachment> component. It works but only when the message displays a single image. If the user sends several images then the component used by Stream is the Gallery. In this case, it is not possible to pass props for indicating we would like to use a custom Image component. It seems possible to customize the Gallery component it means too much work.
So here are a couple of solutions:
- Able to provide a spinner or a placeholder to the existing Image Stream component and this would be reflected on single and gallery image
- Be able to provide a custom Image component used for a single image but also for multi-image (Gallery)