{"id":2352,"date":"2012-02-02T17:20:26","date_gmt":"2012-02-02T17:20:26","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2012\/02\/02\/319-using-a-subdomain-to-store-your-images-in-opencart\/"},"modified":"2023-12-22T15:26:47","modified_gmt":"2023-12-22T20:26:47","slug":"using-a-subdomain-to-store-your-images-in-opencart","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/","title":{"rendered":"Using a Subdomain to store your images in OpenCart 1.5"},"content":{"rendered":"\n<div class=\"alert\"><strong>NOTE:<\/strong> This article will only work for Opencart versions <strong>prior<\/strong> to 1.5.5.1. It does not work for versions 1.5.5.1 or newer.<\/div>\n\n\n\n<p>Google Page Speed recommends using a subdomain to store images that are loaded into your OpenCart store. When a web page tries to load images, scripts, and content they load one at a time. If you have a lot of images, it could dramatically impact your page load speeds. By having the images in a subdomain, they can load at the same time as the site does.<\/p>\n\n\n\n<p>First, you\u2019ll need to <a href=\"\/support\/\">create a subdomain<\/a> for the images in cPanel. During the set up of the subdomain &nbsp;you\u2019ll need to set the document root for the subdomain to the current folder where your images are stored. In this example, we set up the subdomain to images.inmotiontesting.com and pointed it to the existing image folder in the root folder of my OpenCart website.<\/p>\n\n\n\n<p>Now, you have to edit the config.php file in the root of OpenCart as well as the config.php file in the admin folder:<\/p>\n\n\n\n<p><strong>Change<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define('HTTP_IMAGE', 'https:\/\/inmotiontesting.com\/image\/');<\/code><\/pre>\n\n\n\n<p><strong>To<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define('HTTP_IMAGE', 'https:\/\/images.inmotiontesting.com\/'); <\/code><\/pre>\n\n\n\n<p>If you are using HTTPS, you\u2019ll want to change the HTTP settings as well:<\/p>\n\n\n\n<p><strong>Change<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define('HTTPS_IMAGE', 'https:\/\/opencart.inmotiontesting.com\/image\/');<\/code><\/pre>\n\n\n\n<p><strong>To<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define('HTTPS_IMAGE', 'https:\/\/images.inmotiontesting.com\/');<\/code><\/pre>\n\n\n\n<p>If you want to test to make sure your changes have successfully worked, after you have made the changes above load your OpenCart site in a web browser. Then look at the source code to make sure all the image references are pointing to the subdomain. Here&#8217;s what our new source code looks like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;div id=\"logo\"&gt;\n   &lt;a href=\"https:\/\/opencart.inmotiontesting.com\/index.php?route=common\/home\"&gt;\n     &lt;img src=\"https:\/\/images.inmotiontesting.com\/data\/head_logo.gif\" title=\"InMotion Hosting OpenCart Demo\" alt=\"InMotion Hosting OpenCart Demo \"\/&gt;\n   &lt;\/a&gt;\n&lt;\/div&gt;<\/code><\/pre>\n\n\n\n<p>If you need further assistance please feel free to <a>ask a question on our support center<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NOTE: This article will only work for Opencart versions prior to 1.5.5.1. It does not work for versions 1.5.5.1 or newer. Google Page Speed recommends using a subdomain to store images that are loaded into your OpenCart store. When a web page tries to load images, scripts, and content they load one at a time.<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/\"> Read More ><\/a><\/p>\n","protected":false},"author":56983,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6,81],"tags":[],"class_list":["post-2352","post","type-post","status-publish","format-standard","hentry","category-domain-names","category-opencart"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using a Subdomain to store your images in OpenCart 1.5 | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"In this article, we&#039;ll explain why Google Page Speed recommends storing your images in a subdomain and how to set up OpenCart to do this.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using a Subdomain to store your images in OpenCart 1.5 | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"In this article, we&#039;ll explain why Google Page Speed recommends storing your images in a subdomain and how to set up OpenCart to do this.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2012-02-02T17:20:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-22T20:26:47+00:00\" \/>\n<meta name=\"author\" content=\"Carrie Smaha\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@carriesmaha\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Carrie Smaha\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/\"},\"author\":{\"name\":\"Carrie Smaha\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/595948dab2995d347a87076abdae19d8\"},\"headline\":\"Using a Subdomain to store your images in OpenCart 1.5\",\"datePublished\":\"2012-02-02T17:20:26+00:00\",\"dateModified\":\"2023-12-22T20:26:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/\"},\"wordCount\":279,\"commentCount\":36,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"Domain Names\",\"OpenCart\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/\",\"name\":\"Using a Subdomain to store your images in OpenCart 1.5 | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2012-02-02T17:20:26+00:00\",\"dateModified\":\"2023-12-22T20:26:47+00:00\",\"description\":\"In this article, we'll explain why Google Page Speed recommends storing your images in a subdomain and how to set up OpenCart to do this.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using a Subdomain to store your images in OpenCart 1.5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/595948dab2995d347a87076abdae19d8\",\"name\":\"Carrie Smaha\",\"description\":\"Carrie Smaha is a Senior Marketing Operations leader with over 20 years of experience in digital strategy, web development, and IT project management. She specializes in go-to-market programs and SaaS solutions for WordPress and VPS Hosting, working closely with technical teams and customers to deliver high-performance, scalable platforms. At InMotion Hosting, she drives product marketing initiatives that blend strategic insight with technical depth.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/carriesmaha\/\",\"https:\/\/x.com\/carriesmaha\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/carries\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using a Subdomain to store your images in OpenCart 1.5 | InMotion Hosting","description":"In this article, we'll explain why Google Page Speed recommends storing your images in a subdomain and how to set up OpenCart to do this.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/","og_locale":"en_US","og_type":"article","og_title":"Using a Subdomain to store your images in OpenCart 1.5 | InMotion Hosting","og_description":"In this article, we'll explain why Google Page Speed recommends storing your images in a subdomain and how to set up OpenCart to do this.","og_url":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2012-02-02T17:20:26+00:00","article_modified_time":"2023-12-22T20:26:47+00:00","author":"Carrie Smaha","twitter_card":"summary_large_image","twitter_creator":"@carriesmaha","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Carrie Smaha","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/"},"author":{"name":"Carrie Smaha","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/595948dab2995d347a87076abdae19d8"},"headline":"Using a Subdomain to store your images in OpenCart 1.5","datePublished":"2012-02-02T17:20:26+00:00","dateModified":"2023-12-22T20:26:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/"},"wordCount":279,"commentCount":36,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Domain Names","OpenCart"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/","url":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/","name":"Using a Subdomain to store your images in OpenCart 1.5 | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2012-02-02T17:20:26+00:00","dateModified":"2023-12-22T20:26:47+00:00","description":"In this article, we'll explain why Google Page Speed recommends storing your images in a subdomain and how to set up OpenCart to do this.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/using-a-subdomain-to-store-your-images-in-opencart\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Using a Subdomain to store your images in OpenCart 1.5"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/595948dab2995d347a87076abdae19d8","name":"Carrie Smaha","description":"Carrie Smaha is a Senior Marketing Operations leader with over 20 years of experience in digital strategy, web development, and IT project management. She specializes in go-to-market programs and SaaS solutions for WordPress and VPS Hosting, working closely with technical teams and customers to deliver high-performance, scalable platforms. At InMotion Hosting, she drives product marketing initiatives that blend strategic insight with technical depth.","sameAs":["https:\/\/www.linkedin.com\/in\/carriesmaha\/","https:\/\/x.com\/carriesmaha"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/carries\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2352","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/56983"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=2352"}],"version-history":[{"count":8,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2352\/revisions"}],"predecessor-version":[{"id":108573,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2352\/revisions\/108573"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=2352"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=2352"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=2352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}