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

fix: moving images to static folder #1760

Closed
wants to merge 1 commit into from
Closed

fix: moving images to static folder #1760

wants to merge 1 commit into from

Conversation

RingoTC
Copy link
Contributor

@RingoTC RingoTC commented Feb 23, 2024

Description

comment: # moving images to static folder and replace img element with next/image for loading optimization

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Screenshots

Before After
"screenshot before" "screenshot after"

How Has This Been Tested?

  • Cypress integration
  • Cypress component tests
  • Jest unit tests

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@dadiorchen
Copy link
Collaborator

@RingoTC thank you for you contribution, why we change to use Image by next.js?

@RingoTC
Copy link
Contributor Author

RingoTC commented Feb 24, 2024

The next/image provides a good optimization for image loading. In the web-map-client project, for example,
<Image src={backgroundPic} alt="profile" />
which loads a huge background picture. Using img directly, the browser will show this background when it loads and require it anytime but next/image will introduce a lazy-load and progressive loading strategy which is important for pictures with big sizes.

Here is some information about the image optimization of next.js, https://nextjs.org/docs/pages/building-your-application/optimizing/images

@RingoTC RingoTC closed this by deleting the head repository Feb 28, 2024
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