Divi Guide: Restore The Missing Image URL Feature


We certainly don’t make it a secret, we love Divi around here. Unfortunately, sometimes Elegant Themes might do things that we don’t like. The most recent such change is the removal of direct URLs for background images and videos. Well, thankfully we’ve found a way around that! And yes, this does restore direct URLs to background videos too.


Why We Need This Feature

I hope that Elegant Themes reads this message as well, because we really do need functionality like this, and I can’t understand why it was removed. We need the ability to input a direct URL for images and videos because we don’t all host our images and videos on our WordPress installation. For example, we use Dropbox Pro as a CDN, storing web content in a public folder and embedding it. This reduces server load dramatically, and increases the speed of our site. After all, why remove a feature that’s already there and used by so many?


How To Do It

If you’re not using a child theme for your site, now would be a really good time to start, because you’ll need it for this hack. Navigate to your child theme’s functions.php file, and add the following code:

Manual Method

add_action('admin_head', 'restore_divi_image_url');

function restore_divi_image_url() {
echo '<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cstyle%3E%0A.et_pb_background-tab--image%20.et-pb-option--has-preview%20.et-pb-upload-field%2C%20.et_pb_background-tab--image%20.et-pb-option--has-preview%20.et-pb-upload-button%2C%20.et_pb_background-tab--video%20.et-pb-option--has-preview%20.et-pb-upload-field%2C%20.et_pb_background-tab--video%20.et-pb-option--has-preview%20.et-pb-upload-button%2C%20.et_pb_background-tab--video%20.et-pb-option--has-preview%20.et-pb-reset-setting%20%7B%0Adisplay%3Ainline%20!important%3B%0A%7D%0A%3C%2Fstyle%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<style>" title="<style>" />';

Save the file, and that’s it, you’re done!

Plugin Method (New!)

I took the time to write a plugin to handle this for you. Simply install this plugin and get your URL field back!

Download As Plugin


How and Why This Works

If you look carefully, all that’s happening is adding a little CSS to the head of your admin pages. That’s because the feature existed all along, but for whatever reason is set to display:none; so as to render it invisible.  The good news is that this functions.php hack is completely harmless because of this, and won’t hurt your site no matter what future updates might come.  The bad news is that Elegant Themes could remove the feature for real in the future, and this won’t work.



Hopefully, Elegant Themes will be restoring this feature in the future, and this hack won’t be needed. There’s also the chance that this might not work on future updates. For now, enjoy!

Pin It on Pinterest