Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable experimental Image cropping features from Astro 5.x #45

Merged
merged 2 commits into from
Dec 5, 2024
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
5 changes: 5 additions & 0 deletions .changeset/sharp-bags-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"trueberryless": patch
---

Enable experimental Image cropping features from Astro 5.x
6 changes: 5 additions & 1 deletion src/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
import { defineConfig } from "astro/config";

// https://astro.build/config
export default defineConfig({});
export default defineConfig({
experimental: {
responsiveImages: true,
},
});
3 changes: 2 additions & 1 deletion src/src/pages/about.astro
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import holiday from '../assets/about/about-1.jpg';
width="1553"
height="873"
src={holiday}
alt="Felix Schneider with his dads at a family holiday eating his favorite dessert, crapes."
alt="Felix Schneider looking into the distance with the Graz clock tower in the background"
priority={true}
/>
</Hero>

Expand Down
4 changes: 2 additions & 2 deletions src/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import portrait from '../assets/portrait.jpg';
alt="Felix Schneider smiling in a formal gray shirt and silver tie, arms crossed against a dark background."
width="480"
height="620"
priority={true}
src={portrait}
/>
</header>
Expand Down Expand Up @@ -121,7 +122,7 @@ import portrait from '../assets/portrait.jpg';
}

.hero img {
aspect-ratio: 5 / 4;
aspect-ratio: 3 / 4;
object-fit: cover;
object-position: top;
border-radius: 1.5rem;
Expand All @@ -143,7 +144,6 @@ import portrait from '../assets/portrait.jpg';
}

.hero img {
aspect-ratio: 3 / 4;
border-radius: 4.5rem;
object-fit: cover;
}
Expand Down
Loading