In the custom files field on the CDN settings tab you can specify the path to the thumbnails and specify some kind of pattern to match those files that are missing; e.g.:
wp-content/uploads/*-thumb.jpg for example
Hi Frederick,
Thanks for the reply.
in my custom files field i already have “wp-content/uploads/*”, but this only seems to help if i manually press the button to upload the custom files.
If i put in the pattern for the extra thumbnails, for example “wp-content/uploads/*-62×62.jpg”, will this mean that when i save a post, these additional files are uploaded automatically to the CDN?
Am i missing something here? because it doesn’t seem to be working?
Would it be possible to manually code this? Im still pretty new to wordpress coding, but would it be possible to add some code so that when any page/post (regardless of post type) is saved, it checks all related thumbnails, and then makes sure they exist on the CDN?
Any information you can give me on this would be greatly appreciated.
Thanks again
Mike
Just in case anyone has a similar problem to me, ive found a work around solution.
I’ve set W3TC to upload changed files every hour, and set “wp-content/upload/*” in my custom files list.
This however means that some of the thumbnails are still not displaying for anywhere up to an hour.
So to solve this, add this to your .htaccess files on your cdn domain
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} \.(jpg|gif|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . http://www.mydomain.co.uk/%{REQUEST_URI} [L]
</IfModule>
This basically redirects any request for an image that doesn’t exist back to your main domain.
This has worked for me, but if your using a different set up, you may need to tweak it.
I would still like to know how i can make it automatically and instantly upload like the rest of the thumbnails though, so i would be grateful for any information
Thanks,
Mike
Have you enabled the auto-upload option?
Hi Frederick,
I have it sent to auto upload changed files every hour.
And every hour, the missing thumbnails are uploaded. Im looking for a way to get all the thumbnails uploaded when they are created.
Also, It seems that the .htaccess file on my CDN is being overwritten by a default file.
This is causing my temp fix to stop working (as it gets rid of my file).
Is there a way to stop the .htaccess file from uploading to the cdn and overwriting my temp fix?
Thanks,
Mike
Unfortunately there’s no instant way to have them uploaded except switching to an origin pull CDN.
Hi Frederick,
Thanks for getting back to me.
Im not too familiar with CDN technology, so i guess i’ll have to find a way to make this work for me.
Thanks again for your help on this
Mike
MaxCDN or CloudFront by Amazon are support and remove this challenge of “syncing” from your site because the CDN does the work for you.
I’m having a similar problem that I already started another thread for http://wordpress.org/support/topic/plugin-w3-total-cache-cdn-images-settings?replies=1#post-3038249 . However, I cannot get some files to upload to the CDN at all. Example:
Files on server:
cave-graffiti-banksy-150×150.jpg
cave-graffiti-banksy-207×212.jpg
cave-graffiti-banksy-300×187.jpg
cave-graffiti-banksy-710×443.jpg
cave-graffiti-banksy-1024×640.jpg
cave-graffiti-banksy.jpg
Files on CDN:
cave-graffiti-banksy-150×150.jpg
cave-graffiti-banksy-300×187.jpg
cave-graffiti-banksy-1024×640.jpg
cave-graffiti-banksy.jpg
Why would it not see two of those files? This happens to every single batch of images, even if I manually upload them. They never get uploaded.
Any ideas?
Are there errors in your server error log? What is the result of the self-test?
If by the “self test,” you mean the “Check FTP server” button, it works fine. There appear to be no errors in the log, though I don’t particularly trust my web host’s cpanel.
I think it makes sense to submit a bug submission form from the support tab of the plugin.