Skip to content

Commit

Permalink
feat: support img.alt
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Feb 17, 2025
1 parent 4e3dd4a commit 7dda592
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# @satorijs/components
# @satorijs/components-*

Components for Satori.js.
1 change: 0 additions & 1 deletion packages/vue/src/content.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export default {
.message-content {
white-space: break-spaces;
line-height: 1.5;
position: relative;
:deep(img), :deep(audio), :deep(video) {
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const render: FunctionalComponent<segment[]> = (elements, ctx) => {
} else if (type === 'at') {
return h('span', `@${attrs.name}`)
} else if (type === 'img') {
return h('img', { src: attrs.src })
return h('img', { src: attrs.src, alt: attrs.alt })
} else if (type === 'audio') {
return h('audio', { src: attrs.src, controls: true })
} else if (type === 'video') {
Expand Down

0 comments on commit 7dda592

Please sign in to comment.