Posted by mavimo on January 23, 2010 at 10:38pm
Jump to:
| Project: | ImageCache |
| Version: | 6.x-2.0-beta10 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | mavimo |
| Status: | closed (won't fix) |
| Issue tags: | frontend performance |
Issue Summary
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).
| Attachment | Size |
|---|---|
| imagecache.module.patch | 2.31 KB |
| imagecache_ui.module.patch | 978 bytes |
| imagecache_ui.pages_.inc_.patch | 3.38 KB |
Comments
#1
I'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).
#2
The CDN integration module will also do this.
#3
ok, but this is a really simple version to CDN module ;)
#4
Subscribe
#5
http://github.com/mavimo/imagecache_subdomain
#6
Please ignore... I was just repeating commend above about CDN :(
#7
I'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.
#8
There is a bug in imagecache_subdomain.module.
Change:
variable_set('imagecache_subdomain_number', 3)
To:
variable_get('imagecache_subdomain_number', 3)
#9
You 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)) {
#10
Fixed ont github repo. tks!
#11
this 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.
#12
This does not appear to work. Like Mercury500, I tried different urls and it continues to save the images in the default location.
#13
Fixed 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.
#14
Please consider submitting the imagecache_subdomain module directly to d.o. I have a CVS account if you want me to post it
#15
@craigme: I'll plublish it in DO into next day.
UPDATE: http://drupal.org/project/imagecache_subdomain I'll relase after some new test.
#16
http://drupal.org/project/imagecache_subdomain this worked for me.
#18
#570132: Support CDN rewriting of ImageCache paths should allow this.