Image sizes
This commit is contained in:
parent
aaa9611b1c
commit
031d057811
5 changed files with 11 additions and 10 deletions
src/components/cards
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue