Solution to NextGen Gallery Slideshow CDN Conflict
July 30th, 2010
Here’s a special quick post this week to solve a problem I’ve been seeing around the web, but with no solution.
I was recently working on a high-traffic site that that uses using the W3 Total Cache plugin in conjunction with an Akamai CDN. This is a great way to optimize site performance and stability, but I did run into the unfortunate side effect of the NextGen Gallery plugin’s slideshow ceasing to work as soon as the CDN was integrated.
Thanks to my favorite WordPress hosting guru Willie Jackson, there is now a solution.
Following Willie’s lead, and as seen in the screencap above, here’s how you fix this issue:
- In the settings box for the W3 Total Cache plugin, labeled ’Performance,’ go into the CDN screen.
- At the bottom of the page, there is a box for rejected files.
- In that box, add the path to the image rotator .swf file (will be “wp-content/uploads/imagerotator.swf” in most cases)
And voila, your slideshow and CDN live together happily ever after!
Category : 2-Minute Tips & Blog & WordPress




Willie Jackson
1 year ago
Thanks for the shout out, my friend. And thanks for giving back to the community by doing posts like this.
Doron
1 year ago
Thank YOU Willie for the all of the great help you’ve provided over the course of our collaboration on that recent project. And I hope to keep contributing as much as I can to the WP community just as you have.
Rob
1 year ago
Not working for me. I must be missing something….
Doron
1 year ago
Did the slideshow used to work and *only* stop after you added the CDN? Just want to make sure that you are having precisely the problem described here.
Also, I have seen that some JavaScript-based plugins (such as NextGen) can break as a result of W3 Total Cache’s JavaScript minification. You can check this post for more info on that bug as it applies to a Facebook plugin, since the same solution would apply to fixing a bug in NextGen: http://www.magneticwebworks.com/solution-to-w3-total-cache-facebook-share-conflict/
Let me know how it goes.
Thanks!
Doron
Rob
1 year ago
Thanks for the reply, Doron.
Yes, it used to work. In fact it still does if I deactivate the W3 plugin. It does not work if I only deactivate CDN, so I don’t know if it’s related to CDN or some other W3 component.
I tried deactivating and reactivating NextGEN- no luck. The only think that allows the slideshow to work is deactivating W3.
Doron
1 year ago
Oops, the link I meant to send you didn’t show up in my comment before. In a nutshell, I am suggesting that you can try keeping the W3 plugin turned on, but make sure that it is not minifying the JavaScript. The post with the info on how to do that is here: http://www.magneticwebworks.com/solution-to-w3-total-cache-facebook-share-conflict
Rob
1 year ago
Thanks for the suggestion, Doron. No joy- still no slideshow with java minification turned off. This is eating up way too much time, but I’ll see what I can come up with tomorrow.
Doron
1 year ago
Hmm, sorry I couldn’t be of more help. Only other thing I’d suggest would be to double-check that the path to imagerotator.swf in W3′s ‘Rejected Files’ textarea field is correct.
Best of luck!!
Martin
1 year ago
Hi Doron, wondering if you could help me, when i use Nextgen slideshow, the slideshow get the files the host site not the cdn, is there a setting i can change to fix
http://myoverlandadventure.com/pakistan-part1/
Doron
1 year ago
Unfortunately it looks like the only folder that the CDN looks at for images is the uploads folder and NOT the gallery folder where NextGen stores your images.
Too bad…
Martin
1 year ago
Surely there must be a way to change this as photo files are the largest files on the site, and the main reason for using the CDN?
Any help to find hack or something would be appreciated.
Doron
1 year ago
I’ve been researching and all I found is someone mentioning that it’s not possible with NextGen. NextGen is just one of many ways to display images on the site. The CDN is mostly intended for images embedded within posts or pages.
I’m not saying that I’m 100% correct, but it looks to me like this is not possible. Wish I could be of more help here.
Wade
11 months ago
Thanks for the post Doron!
I am implementing W3TC on an existing WP install with a pre-existing NextGen install.
The problem I am running into is the above, plus the fact that I can’t seem to find the ‘imagerotator.swf’ anywhere! I’ve tried doing a server wide search for the file. So without saying, it’s not located in ‘wp-content/uploads’.
When I turn enable CDN, the gallery breaks and instead of shoing a default LG image and the thumbnails, it embeds all the images in the gallery into the post… weird.
Anyone have any ideas what maybe going on here, or where I might find ‘imagerotator.swf’?
Doron
11 months ago
Thanks Wade! Have you tried downloading the .swf here: http://www.longtailvideo.com/players/jw-image-rotator ?
And next, uploading it to your wp-content/uploads directory, then going into the Gallery > Options > slideshow page in your admin (/wp-admin/admin.php?page=nggallery-options#slideshow) and pointing nextgen to your .swf from there?