Skip to content

After rewriting the img components, each rolling of the page will cause Image to reload, and the page flickering #881

Closed as not planned
@QiaoLi1996

Description

@QiaoLi1996

Initial checklist

Affected package

"react-markdown": "^9.0.1", "next": "15.0.4-canary.31",

Steps to reproduce

I need to add attributes Crossorigin = "Anonymous" to support the cross -domain of image resources. I did not find a good method, so I rewritten IMG components. As shown below:

 components={{
                img({ src, alt }) {
                    return <img src={src} alt={alt} crossOrigin="anonymous" />
                },
            }}

Then the error happened

Actual behavior

Each rolling of the page will cause Image to reload, and the page flickering.
But the default behavior is normal, remove the iMage rewriting code to return to normal.

Expected behavior

After rewriting the img components, each rolling of the page not reload the image

Runtime

No response

Package manager

No response

Operating system

No response

Build and bundle tools

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    👎 phase/noPost cannot or will not be acted on🙋 no/questionThis does not need any changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions