mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-29 04:44:23 +01:00
optimize html, css, svg's, and webp delivery
This commit is contained in:
75 files changed
+452
-331
No files matched your search
@@ -2,6 +2,7 @@ import { Link, Table } from '@radix-ui/themes';
|
||||
import MarkdownToJSX from 'markdown-to-jsx';
|
||||
import type { ComponentProps } from 'react';
|
||||
import { docImageUrl, isExternalImage } from '../core/blitzkit/docImages';
|
||||
import { LazyImage } from './LazyImage';
|
||||
|
||||
interface MarkdownProps {
|
||||
children: string;
|
||||
@@ -9,7 +10,7 @@ interface MarkdownProps {
|
||||
|
||||
function Image({ src, ...props }: ComponentProps<'img'>) {
|
||||
return (
|
||||
<img
|
||||
<LazyImage
|
||||
style={{ maxWidth: '100%' }}
|
||||
src={src && isExternalImage(src) ? docImageUrl(src) : src}
|
||||
{...props}
|
||||
|
||||
Reference in new issue
Block a user