feat: remove astro-imagetools

It's not worth the effort.
This commit is contained in:
Stefan Imhoff
2024-04-04 13:51:17 +02:00
parent d16afb6965
commit fc60b28ac1
55 changed files with 78 additions and 524 deletions

View File

@@ -1,15 +1,6 @@
---
import cx from 'classnames';
import { Img } from 'astro-imagetools/components';
import type { ImgConfigOptions } from 'astro-imagetools';
interface Props extends ImgConfigOptions {
class?: string;
noMargin?: boolean;
src: string;
}
const { class: className, noMargin, src, ...props } = Astro.props;
const classes = cx(
@@ -22,17 +13,5 @@ const imageClasses =
---
<div class={classes}>
{
src.includes('.svg') ? (
<img class={imageClasses} src={src} {...(props as any)} />
) : (
<Img
attributes={{ class: imageClasses }}
breakpoints={[500, 1000, 1500]}
format="webp"
src={src}
{...props}
/>
)
}
<img class={imageClasses} decoding="async" loading="lazy" src={src} {...props} />
</div>