Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/avatar.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/example.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion components/atoms/author-info/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface AuthorInfoProps {
export function AuthorInfo({ image, author, dateTime }: AuthorInfoProps) {
return (
<div className={styles.content}>
<Image src={image} width={36} height={36} alt="avatar" />
<Image src={image} width={36} height={36} alt="avatar" sizes="36px" />
<div className={styles.author}>
<span>{dateTime}</span>
<br />
Expand Down
13 changes: 10 additions & 3 deletions components/organisms/campaign/index.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
import React from 'react'
import styles from './style.module.css'
import Image from 'next/image'
import picture from '../../../assets/example.png'
import picture from '../../../assets/example.webp'
import { AuthorInfo } from '../../atoms'
import avatar from '../../../assets/avatar.png'
import avatar from '../../../assets/avatar.webp'

export function Campaign() {
return (
<div className={styles.content}>
<h6>Starfund #821</h6>
<h1>Planetary open-source photography</h1>
<AuthorInfo author="Sam Stroop" dateTime="21 hours ago" image={avatar} />
<Image src={picture} width={642} height={294} alt="project image" />
<Image
src={picture}
width={642}
height={294}
alt="project image"
sizes="(max-width: 768px) 100vw, 642px"
priority
/>
<p>
Hello! My name is Sam and I’m working with a team of three other
passionate individuals to take photos of the planets in our solar system
Expand Down
7 changes: 7 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ const nextConfig = {
locales: ['en', 'es'],
defaultLocale: 'en',
},
images: {
// Serve WebP (and AVIF where supported) instead of the original format.
formats: ['image/avif', 'image/webp'],
// Breakpoints used when generating responsive srcsets.
deviceSizes: [640, 750, 828, 1080, 1200, 1920],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
},
};

setupDevPlatform();
Expand Down
Loading
Loading