dannyvankooten / wp-cdn-loader

Loads WordPress assets from a CDN instead of of local server.
https://git.sr.ht/~dvko/wp-cdn-loader
22 stars 10 forks source link

Add option to include images in /uploads/ #2

Open prandelicious opened 7 years ago

dannyvankooten commented 7 years ago

Hi @prandelicious,

Is this aimed at default WP images uploaded through the Media uploader?

wykydtronik commented 7 years ago

This would be great, actually this is why I discovered this Plugin on the forums. Let me give you an scenario which would help me.

I am task to migrate several WP blogs onto AWS and ensure scalability. Originally hosted on a CentOS WHM server, the developer maintained everything via FTP / Cpanel / PHPMyAdmin.

This multi-site network has media files in path like:

http://mysubsite.mynewsblog.com/files/12/2/myface.jpg

During the migration, all media files are put onto S3 / CloudFront. Using the AWS Plugin with S3 Offload Lite, the file structure is now:

http://cdn.mynewsblog.com/wp-content/files/sites/14/12/2/myface.jpg

The problem with this is all attachments / media files in the database can't be easily fixed with a find & replace SQL query. Any previously uploaded content is broken.

A feature that would be nice for this lightweight plugin is to fix media file URL's before they return to the users. I'm not sure how this would work, but there's a user scenario for you to think about.

michaelrimbach commented 7 years ago

+1