NextJS Strict CSP using next/image

90 views Asked by At

I'm trying to implement a strict Content Security Policy in my app and although I don't use any inline styles I was getting a ton of errors for unsafe-inline styles.

Inspecting my page on my browser developer's tools in the Elements tab, I noticed that all images had inline styles applied so I realized that Next's <Image /> component renders out an <img style="color:transparent;background-size:cover;..." /> with inline styles applied.

Does anyone know if there is an efficient solution for this/how <Image /> can be used with strict CSP?

Thanks in advance!

0

There are 0 answers