feat: automatically apply asset caching to img src and srcset (#184)

This commit is contained in:
Sylvain Cau
2022-05-19 19:19:59 +02:00
committed by GitHub
parent c1a9d53b18
commit e8b1e229b3
11 changed files with 254 additions and 50 deletions
+7 -2
View File
@@ -1,12 +1,17 @@
/** @jsx h */
import { asset, h } from "../client_deps.ts";
import { h } from "../client_deps.ts";
export default function Test(props: { message: string }) {
return (
<div>
<p>{props.message}</p>
<img src={asset("/image.png")} />
<img
id="img-in-island"
src="/image.png"
srcset="/image.png 1x"
height={130}
/>
</div>
);
}