Magento Forum

   
Changing Image Folder Location For Better Performance
 
chadhenry
Member
 
Total Posts:  38
Joined:  2009-01-01
 

In an effort to increase Magento’s performance I was wondering if it was possible to move the product image directory to a sub-domain while keeping all remaining Magento directories on the main domain.

According to HTML 1.1 specs, browsers only download two files in parallel per domain. By moving the image folder to a sub-domain I was hoping to allow up to four parallel downloads and thus decrease page rendering times on “image heavy” sites.

Any help would be appreciated!

PS: I already fully optimize my image file sizes for web use.

 
Magento Community Magento Community
Magento Community
Magento Community
 
brendanb
Mentor
 
Total Posts:  1077
Joined:  2008-07-16
London, United Kingdom
 

hi,

interesting idea. i dont know the answer but as an alternative some people are having the images hosted on a third party server or cdn

there has been some code shared around as to how to implement. search on images and cdn. I cannot recall the exact thread name

hth
brendan

 
Magento Community Magento Community
Magento Community
Magento Community
 
chadhenry
Member
 
Total Posts:  38
Joined:  2009-01-01
 

Hi Brendan, Thanks for the reply.

I’ve thought of using a CDN but I’ve had some bad experiences with a few and my search here on Magento hasn’t returned anything of much use.... maybe I’m just missing the post.

I want to keep all my files local and prefer not to rely on servers that are not under my control. Not only that, but depending on how you implement a CDN, or how the CDN is set up, you could actually slow the load times even more than just keeping the image files as they are by default in Magento. This is because a DNS lookup is required for every domain a file is located on… if you’re compiling a page that has files located on numerous domains, the DNS lookups could stall the page.

 
Magento Community Magento Community
Magento Community
Magento Community
 
brendanb
Mentor
 
Total Posts:  1077
Joined:  2008-07-16
London, United Kingdom
 

yeah i can see your point. But if you could setup this for redundancy you could be on a winner. But technically im not sure how that could be done. You would need to be polling sites to make sure they’re up..

anyway.. check this thread on cdn code.
http://www.magentocommerce.com/boards/viewthread/4353/

also. you could try this
Goto the configuration page in admin
Select your website.
Goto the web settings page
Select the unsecure option.
Change the “Base Media URL” to the url for your image domain.
that might solver ur problem.
point the “Base Media URL” to another location than the default website setup

hth
brendan

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top