Open Fabilin opened 2 years ago
Hello @Fabilin good idea. As long as it remains optional of course.
How would you implement this:
<img>
attributes), or CSS properties enabling more units like em, %, etc.?cc @pi-2r @correi-f @elebescond
I had not considered setting the dimensions through CSS, it is true that this would allow for a lot more flexibility, and possibly responsiveness as well.
On the other hand, here are the benefits I can think of from specifying size for the HTML attributes :
For these reasons I would still recommend setting the HTML width and height, be it only for simplicity's sake.
I believe image size should be (optionally) specified for each image sent by the bot's backend; tock-react-kit already has options to set CSS overrides for all images displayed in the conversation.
Large images currently cause resizing issues in tock-react-kit once they fully load (most apparent being the scrollbar jumping up). Specifying the width and height when sending an image from the server would ensure the corresponding img tags get the right size from the start.