feat: refactor whole bunch of stuff
This commit is contained in:
@@ -34,7 +34,7 @@ const Image = (
|
||||
class: string;
|
||||
src: string;
|
||||
alt?: string;
|
||||
thumbnail?: string;
|
||||
thumbhash?: string;
|
||||
fill?: boolean;
|
||||
width?: number | string;
|
||||
height?: number | string;
|
||||
@@ -55,19 +55,17 @@ const Image = (
|
||||
height: props.fill ? "100%" : "",
|
||||
zIndex: props.fill ? -1 : "",
|
||||
}}
|
||||
data-thumb={props.thumbnail}
|
||||
data-thumb={props.thumbhash}
|
||||
>
|
||||
<img
|
||||
data-thumb={props.thumbnail}
|
||||
data-thumb-img
|
||||
loading="lazy"
|
||||
alt={props.alt}
|
||||
style={props.style}
|
||||
srcset={responsiveAttributes.srcset}
|
||||
sizes={responsiveAttributes.sizes}
|
||||
src={`/api/images?image=${asset(props.src)}${
|
||||
props.width ? `&width=${props.width}` : ""
|
||||
}${props.height ? `&height=${props.height}` : ""}`}
|
||||
src={`/api/images?image=${asset(props.src)}${props.width ? `&width=${props.width}` : ""
|
||||
}${props.height ? `&height=${props.height}` : ""}`}
|
||||
width={props.width}
|
||||
height={props.height}
|
||||
class={props.class}
|
||||
|
||||
Reference in New Issue
Block a user