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

Use next/image component for campaign images #1580

Merged
merged 5 commits into from
Sep 10, 2023

Conversation

sashko9807
Copy link
Member

@sashko9807 sashko9807 commented Sep 4, 2023

Use next/image component for campaign card images.

Closes #{issue number}

Motivation and context

As of now we don't have a strict policy on image sizes for campaign's cards. This result in scenarios where a 1MB images are used, which affects both the user experience, and web vitals stats tremendously, as it takes some time before they are downloaded by the client.

The easiest way to solve this, is to use Next's Image component which provides, out of the box optimizations to reduce image size(such as automatically converting it to webp, and compressing it).

@github-actions
Copy link

github-actions bot commented Sep 4, 2023

✅ Tests will run for this PR. Once they succeed it can be merged.

@sashko9807 sashko9807 force-pushed the campaign-image-optimization branch from a1e73d6 to 0c4d5c0 Compare September 5, 2023 10:32
@sashko9807 sashko9807 marked this pull request as ready for review September 5, 2023 11:05
@igoychev igoychev added the run tests Allows running the tests workflows for forked repos label Sep 10, 2023
@github-actions github-actions bot removed the run tests Allows running the tests workflows for forked repos label Sep 10, 2023
Copy link
Contributor

@igoychev igoychev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great to use the automatic optimizations of nextjs/image

@igoychev igoychev merged commit 3fd002c into podkrepi-bg:master Sep 10, 2023
11 of 12 checks passed
@igoychev
Copy link
Contributor

this change is also helping in reducing chances of dissapearing images like in this issue: #1549

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants