Skip to content

Commit 147f398

Browse files
Refactor responsive image queries in event and publication pages
- Remove fixed height from responsiveImage parameters for better adaptability. - Add sizes attribute to banner images for improved responsiveness on different screen widths.
1 parent 7f058f8 commit 147f398

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/pages/events/[slug]/_eventPage.query.graphql

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ query EventPage($locale: SiteLocale = nl, $slug: String!) {
1010
endDate
1111
location
1212
image {
13-
responsiveImage(imgixParams: { fit: crop, h: 416, auto: format }) {
13+
responsiveImage(imgixParams: { fit: crop, auto: format }) {
1414
alt
1515
base64
1616
bgColor
@@ -33,7 +33,10 @@ query EventPage($locale: SiteLocale = nl, $slug: String!) {
3333
title
3434
slug
3535
banner {
36-
responsiveImage(imgixParams: { fit: crop, h: 416, auto: format }) {
36+
responsiveImage(
37+
imgixParams: { fit: crop, auto: format }
38+
sizes: "(min-width: 890px) 80vw, 100vw"
39+
) {
3740
alt
3841
base64
3942
bgColor

src/pages/publicaties/[slug]/_publicationPage.query.graphql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ query PublicationPage($locale: SiteLocale!, $slug: String!) {
1515
name
1616
}
1717
banner {
18-
responsiveImage(imgixParams: { fit: crop, h: 416, auto: format }) {
18+
responsiveImage(
19+
imgixParams: { fit: crop, auto: format }
20+
sizes: "(min-width: 890px) 80vw, 100vw"
21+
) {
1922
base64
2023
height
2124
width

0 commit comments

Comments
 (0)