Skip to content

(refactor):Improve the support for Image component from next#696

Open
JayaKrishnaNamburu wants to merge 4 commits into
developmentfrom
fix/next-image-support
Open

(refactor):Improve the support for Image component from next#696
JayaKrishnaNamburu wants to merge 4 commits into
developmentfrom
fix/next-image-support

Conversation

@JayaKrishnaNamburu
Copy link
Copy Markdown
Member

fixes #686

But, currently the new Image component doesn't work as expected with styled-jsx. Here is the issue vercel/next.js#38822 Let's wait for some info on that

@JayaKrishnaNamburu
Copy link
Copy Markdown
Member Author

I came back looking at this, @mihaisampaleanu here is where we left the discussion to handle this. Currently next/image don't support className prop and apply them on the image. Instead they ask to adopt css-modules. So, we should decide if we move ahead and make Next - CSS Modules as default for the nextjs projects.

The only down side is, any legacy custom-scripts that are following classnames might break. Since css-modules hash the class-names for deployments. But, at the end this switch will be a huge perf gain. So, should we switch to it and give warning to old scripts users ?

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 19, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (53c7b8a) 70.52% compared to head (b9ca4ee) 70.52%.

Additional details and impacted files
@@             Coverage Diff              @@
##           development     #696   +/-   ##
============================================
  Coverage        70.52%   70.52%           
============================================
  Files              170      170           
  Lines             6999     6999           
  Branches          2026     2026           
============================================
  Hits              4936     4936           
  Misses            2060     2060           
  Partials             3        3           
Impacted Files Coverage Δ
...ort-project-generator-next/src/project-template.ts 100.00% <ø> (ø)
...ckages/teleport-plugin-jsx-next-image/src/index.ts 91.66% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

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.

Using Image from next/Image all the time for all images.

1 participant