diff --git a/web/src/features/skill/markdown-renderer.test.tsx b/web/src/features/skill/markdown-renderer.test.tsx
new file mode 100644
index 00000000..d7f39c4c
--- /dev/null
+++ b/web/src/features/skill/markdown-renderer.test.tsx
@@ -0,0 +1,12 @@
+import { describe, expect, it } from 'vitest'
+import { MARKDOWN_IMAGE_CLASS_NAME } from './markdown-renderer'
+
+describe('MARKDOWN_IMAGE_CLASS_NAME', () => {
+ it('keeps markdown images at their intrinsic width while remaining responsive', () => {
+ const classNames = MARKDOWN_IMAGE_CLASS_NAME.split(' ')
+
+ expect(classNames).toContain('h-auto')
+ expect(classNames).toContain('max-w-full')
+ expect(classNames).not.toContain('w-full')
+ })
+})
diff --git a/web/src/features/skill/markdown-renderer.tsx b/web/src/features/skill/markdown-renderer.tsx
index 0a9931a3..12c18cce 100644
--- a/web/src/features/skill/markdown-renderer.tsx
+++ b/web/src/features/skill/markdown-renderer.tsx
@@ -6,6 +6,8 @@ import { cn } from '@/shared/lib/utils'
import { remarkInferCodeLanguage } from './code-language'
import { stripMarkdownFrontmatter } from './markdown-frontmatter'
+export const MARKDOWN_IMAGE_CLASS_NAME = 'h-auto max-w-full'
+
interface MarkdownRendererProps {
content: string
className?: string
@@ -181,7 +183,7 @@ export function MarkdownRenderer({ content, className }: MarkdownRendererProps)
),
img: ({ className: imageClassName, alt, ...props }) => (
-
+
),
}}
>