fix: add loop="infinite" to img tags to ensure GIFs play continuously (fixes #1480)#1676
fix: add loop="infinite" to img tags to ensure GIFs play continuously (fixes #1480)#1676carlosjarenom wants to merge 1 commit into
Conversation
ee60676 to
e4568c0
Compare
…fixes eigent-ai#1480) GIFs generated by eigent agents were only playing once and then stopping on the last frame. Added loop="infinite" attribute to all img tags in the MarkDown component to ensure they loop properly. This affects: - Images rendered from relative paths (data URLs) - Images rendered from absolute URLs - Image preview dialog While HTML img tags should loop GIFs by default, this explicit attribute ensures consistent behavior across browsers and Electron.
e4568c0 to
aa0e841
Compare
|
Rebased on latest upstream/main and force-pushed. Changes: Added |
|
@carlosjarenom Thanks for the contribution. This implementation does not fix #1480. The loop attribute is not valid for an HTML The branch also currently fails TypeScript and ESLint checks because of the unsupported attribute. Please fix the generated GIF data to include infinite looping, or use another supported mechanism to restart the animation. A regression test using a known one-shot GIF would also be helpful. @4pmtong Could you also take a look at the expected implementation for this fix? |
Problem
GIFs generated by eigent agents would only play once and then stop on the last frame, instead of looping continuously.
Reported in issue #1480.
Fix
Added
loop="infinite"attribute to all<img>tags in the MarkDown component (src/components/ChatBox/MessageItem/MarkDown.tsx), covering:While HTML
<img>tags should loop GIFs by default, this explicit attribute ensures consistent behavior across browsers and Electron.Files Changed
src/components/ChatBox/MessageItem/MarkDown.tsx- Addedloop="infinite"to img tags