Eager-load first card pic
This commit is contained in:
parent
babda52779
commit
dc651e09d1
2 changed files with 6 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ export const greatAi: TimelineElementParameters = {
|
||||||
image: greatAiPoster,
|
image: greatAiPoster,
|
||||||
alt: 'some example code using GreatAI',
|
alt: 'some example code using GreatAI',
|
||||||
container: true,
|
container: true,
|
||||||
|
isEagerLoaded: true,
|
||||||
}),
|
}),
|
||||||
description:
|
description:
|
||||||
'I investigated an approach for increasing the adoption rate of ML deployment libraries and hence the overall quality of industrial deployments. I did this by simultaneously focusing on providing robust, automated implementations of best practices and an accessible API. One of the outcomes of my research is the GreatAI framework.',
|
'I investigated an approach for increasing the adoption rate of ML deployment libraries and hence the overall quality of industrial deployments. I did this by simultaneously focusing on providing robust, automated implementations of best practices and an accessible API. One of the outcomes of my research is the GreatAI framework.',
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,14 @@ export const Image = ({
|
||||||
container = false,
|
container = false,
|
||||||
isIgnoredByImageViewer = false,
|
isIgnoredByImageViewer = false,
|
||||||
sizes = null,
|
sizes = null,
|
||||||
|
isEagerLoaded = false,
|
||||||
}: {
|
}: {
|
||||||
image: ResponsiveImage;
|
image: ResponsiveImage;
|
||||||
alt: string;
|
alt: string;
|
||||||
container?: boolean;
|
container?: boolean;
|
||||||
isIgnoredByImageViewer?: boolean;
|
isIgnoredByImageViewer?: boolean;
|
||||||
sizes?: string | null;
|
sizes?: string | null;
|
||||||
|
isEagerLoaded?: boolean;
|
||||||
}): html => `
|
}): html => `
|
||||||
${
|
${
|
||||||
container
|
container
|
||||||
|
|
@ -29,10 +31,12 @@ export const Image = ({
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
${isIgnoredByImageViewer ? 'image-viewer-ignore' : ''}
|
${isIgnoredByImageViewer ? 'image-viewer-ignore' : ''}
|
||||||
loading="lazy"
|
${isEagerLoaded ? '' : 'loading="lazy"'}
|
||||||
srcset="${image.srcSet}"
|
srcset="${image.srcSet}"
|
||||||
${sizes ? `sizes="${sizes}"` : ''}
|
${sizes ? `sizes="${sizes}"` : ''}
|
||||||
src="${image.src}"
|
src="${image.src}"
|
||||||
|
width="${image.width}"
|
||||||
|
height="${image.height}"
|
||||||
alt="${alt}"
|
alt="${alt}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue