Jump to content

- - - - -

Increase Page Load Performance by Use of an Image Subdomain

4 replies to this topic

#1 Ernst Jakob

Ernst Jakob

    Advanced Member

  • Members
  • PipPipPip
  • 35 posts
  • LocationSwitzerland

Posted 13 February 2015 - 12:33 AM

Loading Shop Images from a SubDomain makes a lot of sense, Pagetesters like

"http://tools.pingdom.com" will 'thank you' for this with a much better 'overall perfomance Result.'


If you use different 'SITE URL's', but only under the SAME MAIN 'Customer Server DIRECTORY', it makes even more sense to CALL the IMAGE URL from another Site-URL, as shown below. This way, you reduce the LOAD of the Shop Server URL even more, compared with just calling the IMAGES from the same basic URL, by USE of the "http //www .SHOP-Server. ccc/image/" Address.


Still, if you have only ONE SITE URL registered within the same (YOURSITE) Server-Directory, DO IT ANYWAY, it will increase Speed in any Case, compared to the DEFAULT OC-Way, i.E.:




("http //www .SHOP-Server. ccc/image/")


'grabbing' it's images from their really OWN 'Place' and trough their OWN 'Lines' and 'Channels', so, not requiring to 'share' the Tasks with the 'Shop' Software itself, building the Page...


Many Internal Server Program Files are routed and loaded 'INTERNALLY', just like when you search for an Image on your local harddisk. Some other 'Routines' have to be 'EXECUTED', as deFacto Runtime Program, then, usually, an EXTERNAL HREF Internet based Call may be requested, to make it work. This, in very short, and very lowdown, the difference between HREF Links and INTERNAL Paths...




This is a typical regular Image 'HREF' URL-CALL, by use of this Mod, calling a Site like:




Assortment of Files, related:



or, if you only have ONE SIte, registered on that specific Server and it's Main Site Directory:


as Alternative, next Best to a really 'separate' Way of doing it.  It's better than nothing, because it will DOUBLE the tasks of the Browsers, trying to built the Page out of the Content delievered...


Compared with, as it would look like, if used the regular 'www' way:




If I call a related Shop Page like:


then, this is a REGULAR 'internal Directory-Path' Image-CALL, by use of DEFAULT 'Link-Values':


And this is the 'internal Directory-Path' Image-CALL, by use of MODIFIED 'Values':


If a Subdomain-Call directs to the same 'Place' as the Shop, the DEFAULT PATH Values will will be used, as mentioned above in the REGULAR Dir-Path Description.


...trying to make it a bit more transparent...





YOU HAVE TO MAKE SURE, all images related to the Shop will be placed in the REMOTE Image Folders, if you PLACE the Image-URL into an other SITE-URL. Otherways, your image-'Handler' will not display and/or 'handle' all images related.


You NEED to operate multiple Servers under the SAME ADMIN accessable Server Path, to make it work under different URL's. THIS, because you need to set PATH's and URL's, and it's not possible for a Server to 'catch' DATA from another Server, on the same Server, but Location and Files placed in an 'outside' Customer Server Path'. I hope, someone understands, what I mean..., and I hope to be 'right' with this as well...


This is a typical INTERNAL Server PATH to the MAIN Image SubDir, in contrary to an URL:


Every Site, hosted under the 'YOURNAME' Main Directory, would be 'usable' to store and later call your images.


In the ZIP File enclosed, you find 3 Images, explaining, where TEXT has to be modified/quoted/deleted (whatever you chose), and added as well. SInce it would be of no use, I have not 'printed' the Config-File Commands anywhere, since they would not match your configuration anyway...


Your load time results  will be:

70-85 percent images from http://images... Server

15-30 percent data from http://shop... Server.


I bet!


Good Luck, I tried to cover it in full...







Remarks to the Image Below Subdomains / Aliases:


Sometimes, Sub-Domains are named WEBSITE ALIAS as well, just to avoid Confusion.

Your Server Admin Console should usually allow you to to set them up by yourselfs.


If setting up an ALIAS, you just DIRECT it's PATH to the Server ROOT, where your OC-Shop Main index+config.php files are located. The 'forwarding' to the Images File Directories works the same as by default, 'starting' the Paths from MAIN FILE ROOT as well.



Attached Thumbnails

  • subdomain.jpg

Edited by Ernst Jakob, 04 June 2015 - 07:02 PM.

  • 0

#2 sunsys



  • Members
  • Pip
  • 1 posts

Posted 03 May 2015 - 12:31 PM

Ernie, I have tried to follow your instructions ditto and this is what I have done(everything is on the same server),

The demo site is installed in demosite2.in/demo13 where fresh oc1564 is installed.


What I have done so far:

1. In the root of my registered domain demosite1, I have created an image sub domain called "imgbox2" (so it looks like http://imgbox2.demosite1.in

2. Then I have modified both configs like:

2a. define('HTTP_IMAGE', 'http://imgbox2.demosite1.in/');      and       define('HTTPS_IMAGE', 'http://imgbox2.demosite1.in/');

2b. define('HTTP_IMAGE', 'http://imgbox2.demosite1.in/');      and       define('HTTPS_IMAGE', 'http://imgbox2.demosite1.in/');

2c. define('DIR_IMAGE', '/home/root/public_html/imgbox2/');


and I have done the change as described by you in "remoteimages.zip" by this fix_image_subdomain.xml file which I got from OC forum. 

and so far things are ok and I can see the images of the products on the site but, and always there is a but, that some images are not resolving correctly through the subdomain: imgbox2, like for example the opencart logo is still looking for the image in demosite2.in/demo13/image folder which is obviously not present though the image file manager(resolving correctly to the sub domain-imgbox2) in admin panel allows me to set the opencart logo correctly but is just not showing in the shop header.


So what should I do to see that all images everywhere in the shop resolve to the sub domain imgbox2 folder. Please help.


Thank You Ernie. 

Edited by sunsys, 03 May 2015 - 01:33 PM.

  • 0

#3 Guest (guest)

Guest (guest)
  • Guests

Posted 07 July 2015 - 07:40 AM

did any figure this out to work correctly on oc 2x?

  • 0

#4 Ernst Jakob

Ernst Jakob

    Advanced Member

  • Members
  • PipPipPip
  • 35 posts
  • LocationSwitzerland

Posted 15 August 2015 - 05:04 PM

> So what should I do to see that all images everywhere in the shop resolve to the sub domain imgbox2 folder. Please help. <


Sorry for the long delay, I was not aware of any new postings about this here.


Unfortunately, not all images in OC are lined exactly the same way. By examples, in the theme/template/header.tpl,

I have manually replaced the 'internally' linked images the way as shown below, to make 'em HTTP_HREF - adressable,

in addition to avoid them to be CALLED trough a COOKIE-DOMAIN, by JUST removing the http;//WWW/ Characters, since

my Shop is configured to be addressed 'http://www.myshop.com'


Sample Lines Header.tpl:

<div id="logo"><a href="<?php echo $home; ?>"><img src="http://hitline.info/.../logo.png......
<div class="warning"><?php echo $error ?><img src="http://hitline.info/...close.png......
<a href="<?php echo $shopping_cart; ?>"><?php echo $text_shopping_cart; ?> &nbsp; <img src="http://hitline.info/.....
<a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?> &nbsp; <img src="http://hitline.info/shop/catalog/....


In addition, many MOD's/Extensions contain IMAGE PATHS, and/or IMAGE LINKS, using the DEFAULT DIR_IMAGE Path to address Images, but by use of an Image SUbdomain, one needs to change such Link/PATH's to HTTP_IMAGE as well, to make those Mod's work.


In other Mod's, I had to insert the full Image Site url:

      <?php if ($product['image']) {
          $img_file = "http://images.openshop.li/shop/image/" . $product['image'];

instead of (weary!) stuff like this:

      <?php if ($product['image']) {
          if (class_exists('MijoShopOpencart')) {$mijoshop = '../components/com_mijoshop/opencart/admin/';} else {$mijoshop = '';}
          $img_file = $mijoshop . "../image/" . $product['image'];

as, by example, in the nice:

Admin - Sale Order 2.9 - CZ faktura - OC 1.56x (dodlist-faktura-DPH) (admin-vqmod)


just to give you an impression, on how it can be done, if you really want to make it 'complete', troughout your Shop, and including
all the Mod's, you probably have installed.


I have updated the content of the File a little:



Good Luck


  • 0

#5 wq123


    Advanced Member

  • Members
  • PipPipPip
  • 140 posts

Posted 15 July 2017 - 06:32 AM

Traditional coach factory online contenders north face Brazil, oakley sunglasses outlet Greece and Turkey ray ban drew the lacoste outlet online other prada three michael kors outlet online spots hermes bags to complete kevin durant jersey the ralph lauren 24-team field converse for this burberry outlet store summers kate spade outlet online tournament in jordan jerseys Spain, oakley sunglasses outlet basketball governing ray ban body levi's jeans FIBA announced converse Saturday coach outlet canada at san antonio spurs jersey its meeting in Barcelona. tommy hilfiger Ken Griffey Jr. was the top polo ralph lauren outlet pick in the 1987 oakley MLB kids hoodies draft. roshe run Then nfl jerseys he went ralph lauren factory store on to have cheap jerseys an illustrious nike air max 22-year career. chi flat iron Now, not only golden state warriors jerseys is wedding dresses he atlanta hawks jersey a Hall bears nfl jersey of Fame inductee, nike shoes outlet but hes adidas canada also swarovski the cover hermes birkin bag athlete for the video giuseppe shoes game MLB dsquared2 jeans The ferragamo shoes Show 17, burberry outlet which hits nike roche run stores on March nike air force 28, marc jacobs 2017.The Kid armani shoes outlet will patriots nfl jersey be cheap true religion the first retired player to grace the cover raptors jersey of The Show. Fans will hilfiger outlet have mcm bags the orlando magic jersey opportunity cowboys nfl jersey to burberry sale play oakley sunglasses outlet with him coach store outlet in boston celtics the game, michael kors outlet as new balance hell dolphins nfl jersey be considered coach bags a baseball bats playable rams nfl jersey living legend.Griffey was ray-ban sunglasses arguably cheap oakley one trail blazers jersey of texans nfl jersey the ralph lauren best outfielders of all time philipp plein clothing and ray ban outlet did soccer shoes it with ravens nfl jersey unprecedented swagger. He was michael kors outlet also a north face backpacks power converse sneakers hitter, finishing his nike air huarache caareer with giants nfl jersey 630 adidas outlet home louboutin runs -- which coach factory outlet now converse shoes ranks sixth in MLB history Traditional omega contenders nike canada Brazil, Greece and eyeglasses stores Turkey drew the lunette oakley other valentino three cavaliers jerseys spots to michael kors bags complete jaguars nfl jersey the 24-team cheap oakley sunglasses field hilfiger outlet for north face jackets this oakley black friday summers oakley sunglasses tournament in Spain, michael kors basketball governing body FIBA knicks jersey announced Saturday beats audio at its air max one meeting air max in hollister kids Barcelona. Ken new balance shoes Griffey supra shoes Jr. ralph lauren uk was the top the north face pick michael kors purses in the 1987 prada shoes MLB cheap glasses draft. christian louboutin Then michael kors he coach handbags outlet went on burberry sale to north face have an illustrious 22-year coach outlet sale career. Now, burberry handbags not ralph lauren outlet online only coach black friday is denver nuggets jersey he vans a Hall watches canada of hugo boss clothes Fame swarovski jewelry inductee, tommy hilfiger but hes also burberry sale the nike mercurial cover indoor soccer shoes athlete for babyliss pro the horloges video game MLB nike mercurial The Show 17, which oakley sunglasses hits oakley stores on louboutin outlet March cheap nhl jerseys 28, 2017.The lunette ray ban Kid pandora will kobe bryant jerseys be the air jordan shoes first longchamp retired ray ban sonnenbrillen player burberry to ray ban sunglasses grace the omega watches cover of The nike Show. hilfiger online shop Fans 49ers nfl jersey will have the opportunity to play with him titans nfl jersey in michael kors handbags the game, polo ralph lauren as hell chargers nfl jersey be fendi bags considered pandora charms a nike free run playable living legend.Griffey swarovski online was burberry handbags arguably juicy couture one mont blanc of the nike best outfielders of roshe all coach outlet online time and did air max it with burberry handbags outlet unprecedented polo ralph lauren swagger. cheap michael kors He air jordan retro was hogan women shoes also coach outlet a power pacers jersey hitter, finishing polo ralph his hollister caareer ray ban sunglasses outlet with 630 new balance canada home ralph lauren polo runs -- pandora which red bottoms now celine black friday ranks ferragamo sixth salvatore ferragamo in MLB mbt mens shoes history calvin klein underwear Traditional michael kors outlet online contenders hollisterco Brazil, Greece and basketball shoes Turkey chaussure timberland drew givenchy handbags the other celine bags three oakley sunglasses cheap spots ray ban wayfarer to chi hair complete the pandora schmuck 24-team michael kors field air max 2015 for dre beats this jordans summers burberry handbags outlet tournament in coach outlet online Spain, clippers jersey basketball polo ralph lauren outlet online governing body FIBA iphone 5 cases announced jazz jersey Saturday beats by dr dre at michael kors black friday its meeting swarovski canada in Barcelona. red bottom shoes Ken Griffey thomas sabo Jr. adidas was handbags outlet the top hollister co pick in fidget spinner the 1987 MLB draft. nba jerseys Then mcm handbags he went on to the north face outlet have an illustrious ray ban outlet 22-year nike air yeezy career. nike outlet Now, giuseppe zanotti sneakers not nike Air Max Plaza only timberwolves jersey is puma online he packers nfl jersey a jordans Hall of rolex replica Fame nike inductee, lions nfl jersey but cheap mlb jerseys hes oakley vault also the air max 90 cover brooklyn nets jersey athlete louboutin outlet for the eagles nfl jersey video ipad mini cases game MLB saints nfl jersey The browns nfl jersey Show northface 17, which hits kate spade outlet online stores barbour jackets on charlotte hornets jerseys March redskins nfl jersey 28, grizzlies jersey 2017.The swarovski jewelry Kid will timberland boots be the knockoff handbags first retired player michael kors outlet online to grace the versace clothes cover of ralph lauren The Show. Fans longchamp outlet will mcm handbags have the hollister opportunity to play with ray bans him pandora jewelry in the asics game, handbags outlet as coach handbags hell asics gel be considered a roshe runs playable living legend.Griffey was nike huaraches arguably one of the best cheap michael kors outfielders michael kors purses of nike shoes all michael kors taschen time cheap jordans and christian louboutin shoes did it discount shoes with nba jersey unprecedented prada outlet swagger. katespade He was salomon also a nike power adidas online hitter, jimmy choo outlet finishing his nike outlet caareer longchamp with steelers nfl jersey 630 home philadelphia 76ers jerseys runs -- which now ranks sixth supra footwear in MLB nike air max 2014 history Traditional contenders Brazil, Greece coach factory and fossil uhren Turkey drew longchamp the colts nfl jersey other coach handbags three burberry sale spots nike to coach factory outlet online complete the under armour curry 24-team designer handbags field for this instyler summers tournament in cheap mlb jerseys Spain, ralph lauren polos basketball ralph lauren outlet governing body phoenix suns FIBA ralph lauren outlet online announced Saturday at its omega watches meeting vans shoes in cheap oakley sunglasses Barcelona. max shoes Ken beats by dr dre Griffey Jr. michael kors was the oakley vault top pick nike free in kate spade bags the cheap nike shoes 1987 veneta MLB draft. Then tory burch shoes he new balance outlet went bottega veneta on nike tracksuits to have an azcardinals nfl jersey illustrious michael kors 22-year bills nfl jersey career. jets nfl jersey Now, chrome hearts store not only is he ralph lauren black friday a Hall nike roshe of barbour outlet online Fame free run inductee, but adidas outlet hes seahawks nfl jersey also the cover athlete for north face the video panthers nfl jersey game MLB The Show true religion jeans men 17, north face which hits hogan outlet stores on nike air max March 28, huarache 2017.The Kid will be burberry outlet online the first longchamp handbags retired player nike air max to michael kors bags grace the dwyane wade jersey cover of michael kors outlet online sale The hollisterco Show. nba jersey Fans will air jordans have true religion outlet the opportunity to play with michael kors canada him coach purses factory in chiefs nfl jersey the game, ralph lauren outlet as new balance hell be vikings nfl jersey considered a playable living replica rolex legend.Griffey longchamp black friday was ray ban sunglasses outlet arguably bucks jersey one long champ of ralph lauren outlet online the nike air huarache best outfielders air max 90 of all hollister time and did barbour jackets it barbour jackets with raiders nfl jersey unprecedented woolrich mens jackets swagger. rolex watches He five finger shoes was also michael kors a nike.com power hitter, finishing his nike roshe caareer with replica rolex 630 home juicy couture outlet runs aktienkurse adidas -- ralph lauren which now michael kors handbags ranks sixth in ray ban MLB cheap barbour jackets history Traditional cheap clothes contenders Brazil, true religion jeans women Greece and Turkey drew ray ban black friday the burberry other broncos nfl jersey three spots north face outlet to occhiali oakley complete michael kors handbags the 24-team jordan field vans for this summers tournament oakley canada in Spain, ray ban outlet online basketball timberland outlet governing michael kors purses body ferragamo shoes FIBA announced Saturday air force at its meeting nike outlet store in softball bats Barcelona. Ken bengals nfl jersey Griffey fake rolex Jr. cheap true religion was the top pick michael kors handbags in adidas the pandora uk 1987 MLB air max draft. cheap jerseys Then oakley he went wizards jersey on to prada handbags have coach store an jimmy choo shoes illustrious mcm handbags outlet 22-year falcons nfl jersey career. ed hardy Now, prada sunglasses not only puma sneakers is timberland shoes he a Hall tommy hilfiger of Fame inductee, buccaneers nfl jersey but hes also the cover reebok athlete rockets jersey for the plein outlet video kings jersey game MLB longchamp outlet The mizuno running Show 17, which dallas mavericks jerseys hits stores on ecco outlet online March coach store online 28, michael kors 2017.The new orleans pelicans Kid nike free run 5.0 will be cartier montres the nike air max first true religion retired dsquared2 outlet player to swarovski crystal grace the cheap nhl jerseys cover of michael kors outlet The Show. Fans cheap jerseys will have ralph lauren online the nike air max 2014 opportunity to ray bans play ray ban outlet with him in the tn pas cher game, as hell be occhiali ray ban considered a playable air max living legend.Griffey bcbg max was tommy hilfiger arguably cheap ray ban one of cheap oakley sunglasses the oakley sunglasses best burberry outfielders louboutin uk of michael kors all time and did it with unprecedented swagger. bcbg max azria He ray ban was adidas also a power hermes hitter, finishing jerseys from china his ralph lauren online shop caareer with thomas sabo 630 home runs -- mcm bags which now ranks sixth marc jacobs in hogan MLB history

  • 0

Reply to this topic



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Community Skin by Fredson Nunes Junior