@autobusal/common 1.8.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,16 +8,20 @@ interface Props {
8
8
  }
9
9
 
10
10
  const Image = ({ type, internal, image_url, title }: Props): JSX.Element => {
11
+ // preview/short are grid/sidebar thumbnails - often several per page,
12
+ // frequently below the fold, so they're deferred. type="view" is the
13
+ // single article's own hero image, likely this page's LCP element, so it
14
+ // loads eagerly at high priority instead.
11
15
  if (type === 'preview' || type === 'short') {
12
16
  return (
13
17
  <ImageLink to={ `/blog/article/${ internal }` }>
14
- <ContainerImage src={ image_url } alt={ title } />
18
+ <ContainerImage src={ image_url } alt={ title } loading="lazy" decoding="async" />
15
19
  </ImageLink>
16
20
  );
17
21
  }
18
22
 
19
23
  return (
20
- <ContainerImage src={ image_url } alt={ title } />
24
+ <ContainerImage src={ image_url } alt={ title } loading="eager" fetchPriority="high" />
21
25
  );
22
26
  };
23
27
 
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to `@autobusal/common` are documented here. This project follows
4
4
  [Keep a Changelog](https://keepachangelog.com/) and [Semantic Versioning](https://semver.org/).
5
5
 
6
+ ## [1.8.1] - 2026-07-30
7
+
8
+ ### Fixed
9
+
10
+ - **Added `loading="lazy" decoding="async"` to below-the-fold list images**
11
+ (`BlogItem/Image.tsx` preview/short thumbnails, `CompanyItem.tsx`,
12
+ `RouteItem.tsx` operator logos) - none had lazy loading, so a search
13
+ results page or operator/agent listing loaded every logo eagerly
14
+ regardless of position. `BlogItem/Image.tsx`'s `type="view"` (the single
15
+ article's own hero image, likely that page's LCP element) instead gets
16
+ `loading="eager" fetchPriority="high"`.
17
+
6
18
  ## [1.8.0] - 2026-07-30
7
19
 
8
20
  ### Added
@@ -16,12 +16,12 @@ const CompanyItem = ({ item, type }: Props): JSX.Element => {
16
16
  { type === 'operator'
17
17
  ? (
18
18
  <LinkLogo to={ item.link }>
19
- <img src={ item.logo_url } alt={ item.company } />
19
+ <img src={ item.logo_url } alt={ item.company } loading="lazy" decoding="async" />
20
20
  </LinkLogo>
21
21
  )
22
22
  : (
23
23
  <ContainerLogo>
24
- <img src={ item.logo_url } alt={ item.company } />
24
+ <img src={ item.logo_url } alt={ item.company } loading="lazy" decoding="async" />
25
25
  </ContainerLogo>
26
26
  ) }
27
27
 
@@ -21,7 +21,7 @@ const RouteItem = ({ type, route, t }: Props): JSX.Element => {
21
21
  <About>
22
22
  <Image>
23
23
  <Logo to={ route.operator.link }>
24
- <img src={ route.operator.logo_url } alt={ route.operator.company } />
24
+ <img src={ route.operator.logo_url } alt={ route.operator.company } loading="lazy" decoding="async" />
25
25
  </Logo>
26
26
  </Image>
27
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/common",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"