---
title: "Disable blocking of SVG files with JavaScript code"
slug: "disable-blocking-of-svg-files-with-javascript-code"
abstract: "Learn how to disable the blocking of SVG files with JavaScript code."
---
# Disable blocking of SVG files with JavaScript code

For security reasons, Scalable Vector Graphics (SVG) files with JavaScript code are blocked when you upload media files to the Media Library. You can turn this feature off by creating a patch config file that deletes the validation processor that checks SVG files for JavaScript code. The processor is called `CheckSvgForJs` and is part of the `validateMedia` pipeline. Turning off the feature affects all SitecoreAI applications that upload files to the Media Library, for example, Page builder and Content Editor.

To disable blocking of SVG files:

> [!note]
> **XM Cloud is now SitecoreAI**
> Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.

1. Create a patch config file.
2. Paste the following code into the file:

    ```
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"
                   xmlns:role="http://www.sitecore.net/xmlconfig/role/">
        <sitecore role:require="!XMCloud">
            <pipelines>
                <validateMedia>
                    <processor type="Sitecore.Pipelines.ValidateMedia.CheckSvgForJs,Sitecore.Kernel" >
                        <patch:delete/>
                    </processor>
                </validateMedia>
            </pipelines>
        </sitecore>
    </configuration>
    ```

3. Save the file to the following folder: */App_Config/Include*.
