Menu
Urgent
Patch your vulnerable projects

NEXTJS_SAFE_SVG_IMAGES

Last updated March 4, 2025

Conformance is available on Enterprise plans

SVG can do many of the same things that HTML/JS/CSS can, meaning that it can be dangerous to execute SVG as this can lead to vulnerabilities without proper Content Security Policy (CSP) headers.

If you need to serve SVG images with the default Image Optimization API, you can set inside your :

In addition, it is strongly recommended to also set to force the browser to download the image, as well as to prevent scripts embedded in the image from executing.


Was this helpful?

supported.