Filemasking in DigitalOcean Spaces Sync

DigitalOcean Spaces Sync plugin connects your WordPress Media Library to a container in DigitalOcean Spaces. It syncs data such as images, attachments from your website to DigitalOcean Spaces Object Storage and replaces links to images (optional). You may keep the media locally (on your server) and make backup copy to cloud storage, or just serve it all from DigitalOcean Spaces.

If you have a lot of images in your WordPress setup it’s better store media to a offshore location. That way WordPress setup gets very portable so incase you have to move to a different server. It’s also saves you lot of storage on your server.

I use this plugin in many of my WordPress setup. It’s very easy to use and well documented.

By default this plugin will copy everything of your media library. But if you want to limit them to certain files extension such as png, jpeg, pdf only, then you need to filter them.

First goto the settings of DigitalOcean Spaces Sync plugin. Then goto the Filemask option which is located in the File & Path Settings section.

Now if you want to copy only certain file types such as png, jpg, then use below codes.


If you want to copy every file types except zip and rar, then use below codes.


Hope this helps.