Skip to content

Commit 832681d

Browse files
committed
Image optimization
1 parent d239d91 commit 832681d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

apps/web/src/components/author-card-full.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { formatNameForURL } from '#src/utils/string.js';
99
import DonateLightning from '../assets/icons/tips-icon.svg';
1010
import { useDisclosure } from '../hooks/index.ts';
1111

12+
import { Image } from './image.tsx';
1213
import { SocialLinks, TopicTags } from './professor-card.tsx';
1314
import { TipModal } from './tip-modal.tsx';
1415

@@ -46,7 +47,10 @@ export const AuthorCardFull = ({
4647
{professor?.name}
4748
</span>
4849

49-
<img
50+
<Image
51+
breakpoints={{ default: 128 }}
52+
width={128}
53+
height={128}
5054
src={resourceImgUrl(professor, 'profile.webp')}
5155
alt={professor?.name}
5256
className="size-32 rounded-full z-10 object-cover [overflow-clip-margin:_unset]"

apps/web/src/components/professor-card.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export const ProfessorCard = ({ professor, ...props }: ProfessorCardProps) => {
3535
<span className="max-w-48 mb-8 w-full text-center text-base lg:title-large-sb-24px text-white lg:uppercase z-10 absolute">
3636
{professor.name}
3737
</span>
38-
<img
38+
<Image
39+
breakpoints={{ default: 64, lg: 128 }}
3940
src={resourceImgUrl(professor, 'profile.webp')}
4041
alt={professor.name}
4142
className="size-16 lg:size-32 rounded-full z-10 mt-12 lg:mt-20 object-cover [overflow-clip-margin:_unset]"

0 commit comments

Comments
 (0)