This patch add feature into imagecache to serve images from different subdomain, this increase front end performance (multiple download) and serve image with cookieless connection. It also add UI to manage this feature.
Actually use can configure only 3 subdomain (number can easy increase by change IMAGECACHE_MAX_SUBDOMAIN), but user can not change it from interface; I think user can add more subdomain and lost performance by multple DNS resolving. This functionality (select number of maximum subdomain) is easy to add.
NOTE: To assicurate cookieless images request use www.www.yourdomain.tpl into $cookies_domain (yes, double WWW, Drupal by default remove the first www).
| Comment | File | Size | Author |
|---|---|---|---|
| imagecache_ui.pages_.inc_.patch | 3.38 KB | mavimo | |
| imagecache_ui.module.patch | 978 bytes | mavimo | |
| imagecache.module.patch | 2.31 KB | mavimo |
Comments
Comment #1
mavimo commentedI've create a separate module to do this (overriding theme function), this patch can be removed from queue (if you prefer don't add this feature into imagecache core module).
Comment #2
rjbrown99 commentedThe CDN integration module will also do this.
Comment #3
mavimo commentedok, but this is a really simple version to CDN module ;)
Comment #4
srobert72 commentedSubscribe
Comment #5
mavimo commentedhttp://github.com/mavimo/imagecache_subdomain
Comment #6
raintonr commentedPlease ignore... I was just repeating commend above about CDN :(
Comment #7
sorvin commentedI've installed the addon module that mavimo linked on comment #5 but I do not see an area enter the sub domain that I wish to use under the configuration tab. Any help would be appreciated.
Comment #8
kkkatsumoto commentedThere is a bug in imagecache_subdomain.module.
Change:
variable_set('imagecache_subdomain_number', 3)
To:
variable_get('imagecache_subdomain_number', 3)
Comment #9
kkkatsumoto commentedYou still neds to fix one thing:
First check in function _imagecache_get_subdomain($file_name = NULL) to:
if (!variable_get('imagecache_subdomain_enable', FALSE) || is_null($file_name)) {
Comment #10
mavimo commentedFixed ont github repo. tks!
Comment #11
Mercury500 commentedthis sounds very interesting.
Tested on a dev site. 6.14. Used files from github as of 1 hour ago. It installs fine, but doesn't seem to do anything.
No cache set on site. I flushed imagecache.
Hummm.
I even inputted a fake subdomain to try to "break" the imagecached images, nope.
Could you give a brief settings/install overview? And yes, I know there's not much settings...
I used "http://www.xxxxxxx.com" as the subdomain, then tried "http://images.xxxxxxx.com" to break.
Is that the correct format?
Thanks.
Comment #12
sorvin commentedThis does not appear to work. Like Mercury500, I tried different urls and it continues to save the images in the default location.
Comment #13
mavimo commentedFixed a theming error into and add INSTALL information.
Test on a clean Drupal + CCK + FileField + ImageField + ImageCache and it work.
Thenks to all for your feedback.
Comment #14
craigmc commentedPlease consider submitting the imagecache_subdomain module directly to d.o. I have a CVS account if you want me to post it
Comment #15
mavimo commented@craigme: I'll plublish it in DO into next day.
UPDATE: http://drupal.org/project/imagecache_subdomain I'll relase after some new test.
Comment #16
stevestanco commentedhttp://drupal.org/project/imagecache_subdomain this worked for me.
Comment #18
drewish commented#570132: Support CDN rewriting of ImageCache paths should allow this.