Skip to content

Commit 4f78c7a

Browse files
committed
Update image sizes.
1 parent 93e9712 commit 4f78c7a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/image.service.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ const service: LocalImageService = {
221221
}
222222
): Promise<{ data: Uint8Array; format: ImageOutputFormat }> {
223223
const sharp = (await import("sharp")).default;
224-
const MAX_WIDTH = 1280;
225-
const MAX_HEIGHT = 1280;
224+
const MAX_WIDTH = 720;
225+
const MAX_HEIGHT = 720;
226226
let buffer = inputBuffer;
227227

228228
if (/^https?:\/\//.test(transform.src)) {
@@ -258,7 +258,8 @@ const service: LocalImageService = {
258258
height = MAX_HEIGHT;
259259
width = Math.round(height * aspectRatio);
260260
}
261-
} else if (height) {
261+
}
262+
if (height) {
262263
// If only height is defined, calculate the width to maintain the aspect ratio
263264
width = Math.round(height * aspectRatio);
264265
if (width > MAX_WIDTH) {

src/pages/session/[slug].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ const nextSessionsOrdered = sameRoomNextSession
156156
src={speaker.data.avatar}
157157
alt={speaker.data.name}
158158
inferSize={true}
159-
class="max-w-[240px] sm:max-w-[540px] xl:max-w-[720px] max-h-[240px] sm:max-h-[540px] xl:max-h-[720px] object-scale-down"
159+
class="w-full max-w-[240px] sm:max-w-[540px] xl:max-w-[720px] max-h-[240px] sm:max-h-[540px] xl:max-h-[720px] object-scale-down"
160160
/>
161161
</div>
162162
</div>

0 commit comments

Comments
 (0)