wordpress-cloud-media-offloader-plugin
wordpress-cloud-media-offloader-plugin copied to clipboard
Add support for CDN (feature request)
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!
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!
I'll try it now. Thanks!
hey @dmhendricks it works! good job.
- First notice, the CDN url is stored within the file metadata which is good for performance (which is maybe the reason you did it), but if one changes the cdn url for any reason the cdn media links will stop working. I think you can use wordpress filters to modify the url on the fly taking the current CDN url in consideration.
- Second notice: Deleted files in the WP media library are not deleted in Backblaze.
Other than that I think it's good. Just some new features and improvement:
- Copy/move all existing media files to the cloud
- ... I'll let you know. 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.
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.
All the files are not deleted.
Here are some screenshots. Hope that helps.