Skip to content

Commit 5688ec7

Browse files
ivanbarlogleebyron
authored andcommitted
FileJet image optimization for "users" page (graphql#680)
1 parent b14e694 commit 5688ec7

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

site/users/index.html.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,27 @@ module.exports = ({ page }) =>
696696
a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1
697697
).map(logo =>
698698
<a href={logo.link} target="_blank" rel="noopener noreferrer nofollow" key={logo.name}>
699-
<img src={'/users/logos/' + logo.img} title={logo.name} className={logo.isRound ? 'round' : null} />
699+
<picture>
700+
<source
701+
media="(min-width: 1020px)"
702+
srcset={
703+
"https://graphql.5gcdn.net/ext/resize_230x110shrink,auto?src=" +
704+
encodeURIComponent(
705+
"https://graphql.github.io/users/logos/" + logo.img
706+
)
707+
}
708+
/>
709+
<img
710+
src={
711+
"https://graphql.5gcdn.net/ext/resize_148x72shrink,auto?src=" +
712+
encodeURIComponent(
713+
"https://graphql.github.io/users/logos/" + logo.img
714+
)
715+
}
716+
title={logo.name}
717+
className={logo.isRound ? "round" : null}
718+
/>
719+
</picture>
700720
</a>
701721
)}
702722
</div>

0 commit comments

Comments
 (0)