Next js Image Component Styled bug
See original GitHub issueWhen I wrapping next js component(Link, Image,… etc), style is not working.
import Image from "next/image";
const CustomImage = styled(Image)`
...style
`;
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Image component causes unexpected behavior with Styled ...
This issue still persists. Next.js is creating additional elements and adds inline styles on them. Totally unusable in this context.
Read more >next/image - Next.js
This section describes the most commonly-used properties of the Image component. Find details about more rarely-used properties in the Advanced Props section.
Read more >Responsive fix for the Next.js Image component
There is an easy fix to this problem, you only have to set a wrapper around the Image component to give a bit...
Read more >How to styled image in next.js - Stack Overflow
How can I style the image to apply postion:abloute to the image component? What to apply more stylish in image component (this image...
Read more >Next.js image optimization techniques | Uploadcare Blog
Image component limitations · Hard to adjust default CSS styles · Conflicts with flexbox · Increased server load and disk space utilization.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Your codesandbox doesn’t even use
next/image
(nornext/link
) right now - so I have no idea what’s broken according to you as the issue is not reproduced there at all.I have not tested this but I believe it should be:
The
Link
accepts your<a/>
a child - it’s just how its API work. And you had a typo in your Image - it should besolid
instead ofsoild