cloudverve / wordpress-cloud-media-offloader-plugin

A simple plugin that allows you to serve your WordPress Media Library files from the Backblaze B2 cloud storage service.
GNU General Public License v2.0
64 stars 13 forks source link

Add support for CDN (feature request) #9

Open jgb-solutions opened 5 years ago

jgb-solutions commented 5 years ago

Add the option to add a CDN in front of Backblaze for faster delivery. For example let's say I want to use Cloudflare as a free CDN in front of my Backblaze cloud storage, after setting this up (example here), I should be able to use something like cdn.mydomain.com/file/folder/file and still access the file stored on the cloud storage but through Cloudflare as a (free) CDN. These are just some suggestions. Making the website even faster now since it won't have to serve large static assets by itself but use the cheap Backblaze B2 service as storage and Cloudflare as a free CDN. By the way Backblaze and Cloudflare partnered to offer free download bandwidth through Cloudflare. Article here

Now there might be some issues. If the site is not new, with exisiting files, they will need to be copied (or moved) to Backblaze to benefit from the CDN performance boost. Otherwise some files would still use the links of the assets hosted on the origin server. And if you use a CDN already with the site then you'll then have two CDN links (backblaze-cdn.mydomain.com and regular-cloudflare-cdn.mydomain.com) or in the worst case have some broken links.

Hope I gave enough information for more than one scenario. Thanks!

dmhendricks commented 5 years ago

Cloudflare is now working (I tested it with one of my domains). See new fields at bottom of Settings page to configure.

If you could verify that it works for you, I'll do a new release. Thanks!

jgb-solutions commented 5 years ago

I'll try it now. Thanks!

jgb-solutions commented 5 years ago

hey @dmhendricks it works! good job.

Other than that I think it's good. Just some new features and improvement:

dmhendricks commented 5 years ago

Deleted files in the WP media library are not deleted in Backblaze.

Is this all files, or just to resized images remain?

And let me know how I can help translate the plugin... I got POEdit. I can clone, edit and make a pull request, just let me know.

Excellent, thank you! I will get back to you on that.

jgb-solutions commented 5 years ago

All the files are not deleted. Here are some screenshots. Hope that helps. screen shot 2018-10-26 at 8 10 14 pm ![Uploading Screen Shot 2018-10-26 at 8.15.52 PM.png…]()