Image sizes

This commit is contained in:
Firq 2024-10-22 21:15:24 +02:00
parent aaa9611b1c
commit 031d057811
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20
5 changed files with 11 additions and 10 deletions
src/components/cards

View file

@ -10,7 +10,6 @@ export interface Props {
}
const { imageFile, link, title } = Astro.props
const logoAltText = `${title} Logo`
const imagePath = `/src/assets/technologies/${imageFile}`
const images_logos = import.meta.glob<GlobImage>(
'/src/assets/technologies/*.{png,webp}'
@ -20,12 +19,12 @@ const loadedImage = plsLoadImage(images_logos, imagePath)
<a href={link} target="_blank" rel="noopener noreferrer" aria-label={title}>
<article>
<Image src={loadedImage} alt={logoAltText} loading={'eager'}/>
<Image src={loadedImage} alt={title} loading={'eager'} width={100} height={100} quality={100}/>
<div>
<h2>{title}</h2>
</div>
</article>
<span class="visually-hidden">{logoAltText}</span>
<span class="visually-hidden">{title}</span>
</a>
<style>