Subscribe On YouTube

Join other subscribers and enjoy other Divi video tutorials!

How To Upload Your Own Custom Divi Background Patterns And Masks

Nelson Miller Profile Orange
In this tutorial I will solve a missing Divi feature and show you how to upload your own custom Divi background patterns and masks.

▶️ Please watch the video above to get all the exciting details! 👆

1. Prepare The SVG Files

The first step is to find or create the SVG file and prepare it for uploading to the web. To do this, you first need to understand how the background patterns and masks work.

Patterns

The patterns are very small tiles that are repeated over and over to make a pattern. So your pattern needs to be a “seamless” tile. You can either search form one online or create your own if you have the experience. I personally found some nice options by searching for “website SVG background pattern” and here is a nice post which lists several of the best sources.

Masks

Masks are a little different. Rather than a repeated tile, the ones in Divi are actually one complete file. They are also different in availability. I’m not even sure what you would search for online to find SVG examples, so most likely if you are wanting to use a custom shape then you already know how to use a vector editing program or can hire someone to create one for you. So I don’t really have any other recommendation for sourcing a custom background mask other than making one.

2. Add Custom CSS Class

The second step is to add a custom CSS class to the element, which would be the section, row, or module where you want to add the custom background pattern or mask. So just open the settings of that element and to the Advanced tab, open the Custom CSS IDs & Classes toggle, and add the class .pa-custom-background-mask-1 or .pa-custom-background-pattern-1. You can see that the number system will be very important as you add the custom CSS snippet in step #3.

3. Add Custom CSS Code

The third step is to add the relevant CSS code snippet below for either patterns or masks. Then you can repeat all the steps for more backgrounds on your site, and if you do that then you would also add a new snippet for each pattern or mask.

Where To Paste The CSS Code

1. Divi Assistant
If you are using our Divi Assistant plugin, simply paste the code in the CSS tab in the custom code window in the Divi Visual Builder.

2. Child Theme
If you are using a child theme, paste this code into the style.css file. If you don't have a child theme, you can generate a child theme directly on your site or download our free child theme.

3. Divi Theme Options Integration
Otherwise, paste this code in your Divi>Theme Options>General tab in the "Custom CSS" code area.

If you need help understanding where to paste the code, please check out our complete guide about where to add custom code In Divi.

Background Pattern

.pa-custom-background-pattern-1 .et_pb_background_pattern {
      background-image: url("PASTE FILE LINK HERE")!important;
}

Background Mask

.pa-custom-background-mask-1 .et_pb_background_mask {
    background-image: url("PASTE FILE LINK HERE")!important;
}

4. Upload The SVG Files

The fourth step is to upload your SVG background pattern or mask files. You will need to allow SVG uploads into WordPress first, and I suggest doing that with a plugin such as Safe SVG. Once the plugin is active, you can upload the files to your WordPress Media library. This is important – we are not uploading the files to a page, but to the Media Library itself. Then, once it is uploaded, simply click on the file and click the “Copy URL to clipboard” button. Then go to the CSS snippet from step #3 and past the link into the snippet where it says PASTE FILE LINK HERE. 

Last updated January 16, 2026

Subscribe For More Divi News & Resources!

At the start of each month, we send out a recap newsletter from the month before with family news, Divi news, our latest tutorials, product news, and a look behind the scenes. Occasionally, if the news is too exciting to wait, we will send out another email separate from the monthly newsletter. That’s what you get when you subscribe, and of course, you can unsubscribe if you are no longer interested!

Blog Post Optin
Divi Logo (2)

Shop Our Divi Products

Plugins • Courses • Templates

Visit The Shop

Featured Products

Asset 4

New! Trail Guides

Follow a series of blog posts carefully arranged around a specific topic or goal! Keep track of your progress by marking posts completed, just like a free course!

View Trail Guides

Divi Tutorials On YouTube

Our videos have views! Join subscribers and enjoy over video tutorials!

Visit Our Channel

Leave A Response!

By commenting you agree to our Blog & YouTube Comments Policy

28 Comments

Comments By Members

These comments are highlighted because they were posted by fans who have a membership on this site.

  1. Heather <span class="comment-author-role-label"><a href="https://www.peeayecreative.com/product/divi-adventure-club/" class="comment-author-role-link" rel="external nofollow" target="_blank">Divi Adventure Club Member</a></span>

    Thank you, thank you, thank you! I was so excited for this option, but of course the ones offered aren’t what I’m looking for. This solves all the problems!!

    Reply

Comments By Others

  1. Clive Spring

    This is great but I can’t get it to work in Divi 5. Is there a reason for this? Thanks

    Reply
    • Hemant Gaba <span class="comment-author-role-label"><a href="https://www.peeayecreative.com/product/divi-adventure-club/" class="comment-author-role-link" rel="external nofollow" target="_blank">Divi Adventure Club Member</a></span>

      Hi Clive!

      Are you getting any error or is the image not showing? Also, share the URL of the page to check further.

      Reply
      • Hemant Gaba <span class="comment-author-role-label"><a href="https://www.peeayecreative.com/product/divi-adventure-club/" class="comment-author-role-link" rel="external nofollow" target="_blank">Divi Adventure Club Member</a></span>

        Hi there!

        I have checked and uploading SVG is not an issue in Divi 5. Can you please try uploading another file and see if it helps?

      • SCAgency

        We can’t get it to work in Divi 5 either. Triple checked uploading the file, the path, the css and assigning the pa-custom-background-mask-1 class to the section. The Divi class .et_pb_background_mask appears to be the same.

        I think it’s because Divi now writes the SVG inline like this…

        .et_pb_section_2 > .et_pb_background_mask { background-image: url(“data:image/svg+xml;utf8,%3Csvg fill=’%23333333′ preserveAspectRatio=’none’ viewBox=’0 0 1920 1440′ xmlns=’http://www.w3.org/2000/svg’%3E%3Cpath d=’M0,1440H1920V0H0ZM870.4,382.19c386.66-102.56,740.21-34.45,789.7,152.12s-223.85,421-610.5,523.5-740.21,34.45-789.7-152.12S483.75,484.74,870.4,382.19Z’/%3E%3C/svg%3E”) !important; transform: scale(1,1) !important; }

        I think these steps need updating for Divi 5.

  2. SLIMANE REMACLE

    Great tutorial!

    I was wondering why the SVG background pattern was added using CSS instead of setting it directly in the module’s Content > Background > Background Image settings. Are there any specific advantages to using CSS for this?

    Reply
    • Hemant Gaba <span class="comment-author-role-label"><a href="https://www.peeayecreative.com/product/divi-adventure-club/" class="comment-author-role-link" rel="external nofollow" target="_blank">Divi Adventure Club Member</a></span>

      Hi Slimane!

      Please note that Divi provide option to add background image and patterns together. Using the CSS way, you can add both.

      Reply
  3. Shelly

    After adding this code and the SVG file will the new mask show up as an option with the other masks? I think I followed directions correctly, but my list of available masks did not change.

    Reply
    • Hemant Gaba <span class="comment-author-role-label"><a href="https://www.peeayecreative.com/product/divi-adventure-club/" class="comment-author-role-link" rel="external nofollow" target="_blank">Divi Adventure Club Member</a></span>

      Hi Shelly!

      I’m afraid the SVG file won’t be showing with the other masks already listed in Divi. You can just use the custom mask using the CSS given above wherever you need. If you need to change the mask, make changes in the code directly.

      Reply
  4. Julia

    Hi Nelson. Fantastic tutorial thank you. In the list of pattern resources you included, there’s one https://heropatterns.com/ which is great because you can customise the pattern, but you end up with CSS as opposed to an SVG file. I’ve just spent a couple hours online trying to figure out how to use the CSS code to apply custom backgrounds in Divi using your tutorial but haven’t found an answer. Are you able to help at all ? Many thanks.

    Reply
  5. Cherry

    Thanks for this tutorial, Nelson! How would I change the svg colour to white please?

    Reply
    • Rick

      Yes, I was wondering the same. Looking forward to a solution 🙂

      Reply
      • Hemant Gaba <span class="comment-author-role-label"><a href="https://www.peeayecreative.com/product/divi-adventure-club/" class="comment-author-role-link" rel="external nofollow" target="_blank">Divi Adventure Club Member</a></span>

        Hi there!

        Please open the svg file in a code editor and change the color in fill or stroke as per your need. Also, most online sites provide this feature as well if you search for ‘change svg color’.

  6. Mike

    dont suppose you have a tutorial on using your own svg shape dividers? i searched and couldn’t find one.

    Reply
  7. Ryan B

    This worked brilliantly. Thank you!!!

    Reply
  8. Greg

    It’s like you read my mind, again! Thanks Nelson.

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Recent Posts

Last updated January 16, 2026
Shopping cart0
There are no products in the cart!
You may be interested in…
Divi Builder Experience Helper Plugin by Pee-Aye Creative
From: $36.00 / year

Select options This product has multiple variants. The options may be chosen on the product page

divi assistant plugin by pee aye creative
From: $69.00 / year

Select options This product has multiple variants. The options may be chosen on the product page

Divi Carousel Maker Plugin by Pee Aye Creative
From: $29.00 / year

Select options This product has multiple variants. The options may be chosen on the product page

Logo for D Beginner Course with graduation cap
From: $47.00 / year

Select options This product has multiple variants. The options may be chosen on the product page

divi events calendar
From: $54.00 / year

Select options This product has multiple variants. The options may be chosen on the product page

Continue shopping
0