How to integrate ImageKit on Shopify store

Sell Online With Shopify
Trusted by millions of businesses worldwide
Sign up for a free trial and enjoy 3 months of Shopify for $1/month on select plans. is an image management service for online businesses. It provides intelligent real-time image optimization, resizing, cropping, and fast CDN delivery. Integrating ImageKit on Shopify store allows you to improve your image quality and delivery speed.

Here are the steps to optimize images on your Shopify website.

Step 1: Configure origin in dashboard

Configure a web server origin based on where your images are stored. In Shopify, this is your CDN base URL i.e., or You can check this under the network panel tab in Chrome like shown in the screenshot below:

Step 2: Fetch image through endpoint

Let’s quickly fetch the image using URL-endpoint and see if it’s working.

When you add the first origin in your account, it automatically becomes accessible through the default URL-endpoint, that is Otherwise, you will have to configure an existing URL endpoint or create a new one to fetch images from this newly added origin.

If your old image URL was, then the same image should be accessible through URL-endpoint, i.e.,

Step 3: Create settings_schema.json

If the above image did work correctly, we can now proceed to make the changes in our Shopify settings and theme files to switch the image delivery and optimization to ImageKit.

From your Shopify admin, click Online Store > Themes. Find the theme you want to edit, click the button, and then click Edit HTML/CSS.

Under Config, click settings_schema.json and copy the code below as the last section of config file and hit Save.

Step 4: Create imagekit.liquid file

Create a new file imagekit.liquid under Snippets directory. Copy the code below into that file, and save it.

Step 5: Enable

Navigate to Online store > Themes > Customize theme. In the sidebar, under general settings open ImageKit and enable it. Fill out the below two fields:

  • Default URL endpoint – It should be
  • Shopify CDN domain – Its value should be //,//
  • Hit the “Save” button.

Step 6: Edit theme files

Now we get to editing your theme files. We first need to find out the files which are responsible for the output of image on your store and start editing them.

Here are a couple of examples indicating the change that needs to be made in the theme files. You can follow similar steps to change all of your theme files.

Example 1:

Example 2:

Example 3:

If there is a tag inside image URL and you cannot simply assign it, use {% capture %}

Source: ImageKit

Looking for Shopify Experts?

Hura Apps can help you take your store to the next level

Our team of experienced designers and developers can help you create a beautiful, high-converting Shopify store that will drive sales and increase customer satisfaction. From custom design to app development and optimization, we have the skills and expertise to help you achieve your eCommerce goals.

Get in touch

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *