Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.

Commit 73dbc83

Browse files
committed
getImageUrl を webp にする
1 parent 5ab9005 commit 73dbc83

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

workspaces/admin/src/features/episodes/components/EpisodeDetailEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ export const EpisodeDetailEditor: React.FC<Props> = ({ book, episode }) => {
281281
src={
282282
thumbnailUrl ??
283283
(episode != null
284-
? getImageUrl({ format: 'jpg', height: 200, imageId: episode.image.id, width: 200 })
284+
? getImageUrl({ format: 'webp', height: 200, imageId: episode.image.id, width: 200 })
285285
: undefined)
286286
}
287287
width={200}

workspaces/admin/src/pages/AuthorListPage/internal/AuthorDetailModal/AuthorDetailContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const AuthorDetailContent: React.FC<AuthorDetailContentProps> = ({ author
3333
return (
3434
<Box aria-label="作者詳細" as="section">
3535
<Flex align="center" pb={2}>
36-
<Avatar name={author.name} size="xl" src={getImageUrl({ format: 'jpg', imageId: author.image.id })} />
36+
<Avatar name={author.name} size="xl" src={getImageUrl({ format: 'webp', imageId: author.image.id })} />
3737
<Stack p={4} spacing={2}>
3838
<StackItem>
3939
<Text fontWeight="bold">{author.name}</Text>

workspaces/admin/src/pages/BookListPage/internal/BookDetailModal/BookDetailContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const BookDetailContent: React.FC<BookDetailContentProps> = ({ book, onCl
4343
aspectRatio="3 / 4"
4444
height={256}
4545
objectFit="cover"
46-
src={getImageUrl({ format: 'jpg', imageId: book.image.id })}
46+
src={getImageUrl({ format: 'webp', imageId: book.image.id })}
4747
width={192}
4848
/>
4949
<Stack p={4} spacing={2}>

workspaces/app/src/foundation/hooks/useImage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const useImage = ({ height, imageId, width }: { height: number; imageId:
88

99
const img = new Image();
1010
img.src = getImageUrl({
11-
format: 'jpg',
11+
format: 'webp',
1212
height: height * dpr,
1313
imageId,
1414
width: width * dpr,
@@ -39,7 +39,7 @@ export const useImage = ({ height, imageId, width }: { height: number; imageId:
3939
ctx.drawImage(img, srcX, srcY, srcW, srcH, 0, 0, width * dpr, height * dpr);
4040
}
4141

42-
return canvas.toDataURL('image/png');
42+
return canvas.toDataURL('image/webp');
4343
}, [height, imageId, width]);
4444

4545
return value;

0 commit comments

Comments
 (0)