{"id":111324,"date":"2019-05-27T17:00:00","date_gmt":"2019-05-27T17:00:00","guid":{"rendered":"https:\/\/avada.io\/blog\/liquid-asset-img-url-how-to-get-asset-image-url-in-shopify\/"},"modified":"2026-04-08T09:05:53","modified_gmt":"2026-04-08T02:05:53","slug":"liquid-asset-img-url-how-to-get-asset-image-url-in-shopify","status":"publish","type":"post","link":"https:\/\/avada.io\/blog\/liquid-asset-img-url-how-to-get-asset-image-url-in-shopify\/","title":{"rendered":"Liquid asset_img_url: How to Get Asset Image URL in Shopify"},"content":{"rendered":"<p>Managing images effectively is a crucial part of optimizing a Shopify store\u2019s design and functionality. For those working with Shopify\u2019s Liquid templating language, knowing how to retrieve asset image URLs can make a significant difference. This guide explains how to use the asset_img_url filter to access your store\u2019s image files easily, improving your store\u2019s visual management and performance.<\/p>\n<p><strong>Table of content<\/strong><\/p>\n<ul>\n<li><a href=\"#general-information-about-liquid-and-url-filter\">General information about Liquid and URL filter<\/a><\/li>\n<li><a href=\"#key-information-about-asset-img-url\">Key information about asset_img_url<\/a><\/li>\n<li><a href=\"#sample-code-to-get-asset-image-url-in-shopify\">Sample code to get asset image URL in Shopify<\/a><\/li>\n<\/ul>\n<h2 id=\"general-information-about-liquid-and-url-filter\">General information about Liquid and URL filter<\/h2>\n<p><a href=\"https:\/\/avada.io\/blog\/liquid\">Liquid<\/a> has been accessed to users for more than a decade and becomes a trustworthy source to upload dynamic content on the front page. Not only is it used by Shopify but Liquid is also applied on Jekyll.<\/p>\n<p>Five main types of filters in Liquid are string, number, boolean, array and URL. Number includes floats and integers. Boolean response to true or false value. Nil is a special empty value that is returned when Liquid code has no results. Our main topic is URL filter.<\/p>\n<p>URL filters outputs links to have access to Shopify\u2019s content network as well as links to edit blogs or articles. Moreover, URL uses numbers, letters flash and a question mark.<\/p>\n<h2 id=\"key-information-about-asset_img_url\">Key information about asset_img_url<\/h2>\n<p>URL or uniform resource locator is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it. A URL contains the following information: the protocol used to access a resource, the location of the server, the location of the resource in the directory structure, a fragment identifier.<\/p>\n<p>All URLs are presented in the following order: scheme name, colon and two slashes, location of server, the location of the resource on the server, fragment identifier.<\/p>\n<p><code class=\"language-plaintext highlighter-rouge\">asset_img_url<\/code> returns the asset of URL of an image in the folder of [a theme]. Besides, asset_img_url accepts size parameters. An image\u2019s width and height is 5760 x 5760 px. The image\u2019s original aspect ratio will be preserved unless you <a href=\"https:\/\/avada.io\/blog\/how-crop-image-shopify\">crop the image<\/a>.<\/p>\n<p>No matter what size you specify, an image can never be resized to be larger than its original dimensions.<\/p>\n<p>For example:<\/p>\n<div class=\"language-plaintext highlighter-rouge\">\n<div class=\"highlight\">\n<pre class=\"highlight\"><code>\n{{ product | img_url: '450x450' }}\n\n<\/code><\/pre>\n<\/div>\n<\/div>\n<h2 id=\"sample-code-to-get-asset-image-url-in-shopify\">Sample code to get asset image URL in Shopify<\/h2>\n<p>Take a look at the sample to see how URL link is generated when you use the URL filer.<\/p>\n<p>Input:<\/p>\n<div class=\"language-plaintext highlighter-rouge\">\n<div class=\"highlight\">\n<pre class=\"highlight\"><code>\n{{ 'logo.png' | asset_img_url: '300x' }}\n\n<\/code><\/pre>\n<\/div>\n<\/div>\n<p>Output:<\/p>\n<div class=\"language-plaintext highlighter-rouge\">\n<div class=\"highlight\">\n<pre class=\"highlight\"><code>\/\/cdn.shopify.com\/s\/files\/1\/0000\/0001\/t\/1\/assets\/logo_300x.png?42\n\n<\/code><\/pre>\n<\/div>\n<\/div>\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>In conclusion, mastering the asset_img_url filter in Shopify is crucial for effective theme management. This powerful tool simplifies the process of retrieving and customizing image URLs, enhancing your store\u2019s visual appeal and performance. By applying the techniques outlined in this guide, you can streamline your workflow and create a more engaging shopping experience. Take action now: start experimenting with asset_img_url in your Shopify theme to unlock its full potential and elevate your online store\u2019s design.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Managing images effectively is a crucial part of optimizing a Shopify store\u2019s design and functionality. For those working with Shopify\u2019s Liquid templating language, knowing how to retrieve asset image URLs can make a significant difference. This guide explains how to use the asset_img_url filter to access your store\u2019s image files easily, improving your store\u2019s visual [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[356,383],"tags":[],"class_list":["post-111324","post","type-post","status-publish","format-standard","hentry","category-shopify","category-shopify-devdocs"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Liquid asset_img_url: How to Get Asset Image URL in Shopify<\/title>\n<meta name=\"description\" content=\"Learn how to easily add images to your Shopify store&#039;s templates using the Liquid asset_img_url filter, enhancing visual appeal and brand consistency.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/avada.io\/blog\/liquid-asset-img-url-how-to-get-asset-image-url-in-shopify\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Liquid asset_img_url: How to Get Asset Image URL in Shopify\" \/>\n<meta property=\"og:description\" content=\"Learn how to easily add images to your Shopify store&#039;s templates using the Liquid asset_img_url filter, enhancing visual appeal and brand consistency.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/avada.io\/blog\/liquid-asset-img-url-how-to-get-asset-image-url-in-shopify\/\" \/>\n<meta property=\"og:site_name\" content=\"Avada Commerce\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/avada.io\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-05-27T17:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-08T02:05:53+00:00\" \/>\n<meta name=\"author\" content=\"Sam\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@avadaio\" \/>\n<meta name=\"twitter:site\" content=\"@avadaio\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sam\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Liquid asset_img_url: How to Get Asset Image URL in Shopify","description":"Learn how to easily add images to your Shopify store's templates using the Liquid asset_img_url filter, enhancing visual appeal and brand consistency.","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:\/\/avada.io\/blog\/liquid-asset-img-url-how-to-get-asset-image-url-in-shopify\/","og_locale":"en_US","og_type":"article","og_title":"Liquid asset_img_url: How to Get Asset Image URL in Shopify","og_description":"Learn how to easily add images to your Shopify store's templates using the Liquid asset_img_url filter, enhancing visual appeal and brand consistency.","og_url":"https:\/\/avada.io\/blog\/liquid-asset-img-url-how-to-get-asset-image-url-in-shopify\/","og_site_name":"Avada Commerce","article_publisher":"https:\/\/www.facebook.com\/avada.io\/","article_published_time":"2019-05-27T17:00:00+00:00","article_modified_time":"2026-04-08T02:05:53+00:00","author":"Sam","twitter_card":"summary_large_image","twitter_creator":"@avadaio","twitter_site":"@avadaio","twitter_misc":{"Written by":"Sam","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/avada.io\/blog\/liquid-asset-img-url-how-to-get-asset-image-url-in-shopify\/#article","isPartOf":{"@id":"https:\/\/avada.io\/blog\/liquid-asset-img-url-how-to-get-asset-image-url-in-shopify\/"},"author":{"name":"Sam","@id":"https:\/\/avada.io\/#\/schema\/person\/cc9c647e3ec94d00dc61ae2e653cafb7"},"headline":"Liquid asset_img_url: How to Get Asset Image URL in Shopify","datePublished":"2019-05-27T17:00:00+00:00","dateModified":"2026-04-08T02:05:53+00:00","mainEntityOfPage":{"@id":"https:\/\/avada.io\/blog\/liquid-asset-img-url-how-to-get-asset-image-url-in-shopify\/"},"wordCount":490,"publisher":{"@id":"https:\/\/avada.io\/#organization"},"articleSection":["Shopify","Shopify Devdocs"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/avada.io\/blog\/liquid-asset-img-url-how-to-get-asset-image-url-in-shopify\/","url":"https:\/\/avada.io\/blog\/liquid-asset-img-url-how-to-get-asset-image-url-in-shopify\/","name":"Liquid asset_img_url: How to Get Asset Image URL in Shopify","isPartOf":{"@id":"https:\/\/avada.io\/#website"},"datePublished":"2019-05-27T17:00:00+00:00","dateModified":"2026-04-08T02:05:53+00:00","description":"Learn how to easily add images to your Shopify store's templates using the Liquid asset_img_url filter, enhancing visual appeal and brand consistency.","breadcrumb":{"@id":"https:\/\/avada.io\/blog\/liquid-asset-img-url-how-to-get-asset-image-url-in-shopify\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/avada.io\/blog\/liquid-asset-img-url-how-to-get-asset-image-url-in-shopify\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/avada.io\/blog\/liquid-asset-img-url-how-to-get-asset-image-url-in-shopify\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/avada.io\/"},{"@type":"ListItem","position":2,"name":"Shopify","item":"https:\/\/avada.io\/category\/shopify"},{"@type":"ListItem","position":3,"name":"Shopify Devdocs","item":"https:\/\/avada.io\/category\/shopify-devdocs\/"},{"@type":"ListItem","position":4,"name":"Liquid asset_img_url: How to Get Asset Image URL in Shopify"}]},{"@type":"WebSite","@id":"https:\/\/avada.io\/#website","url":"https:\/\/avada.io\/","name":"Avada Commerce","description":"Blog","publisher":{"@id":"https:\/\/avada.io\/#organization"},"alternateName":"Avada Commerce","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/avada.io\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/avada.io\/#organization","name":"Avada Commerce","alternateName":"Avada Commerce","url":"https:\/\/avada.io\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/avada.io\/#\/schema\/logo\/image\/","url":"https:\/\/avada.io\/wp-content\/uploads\/2023\/06\/Avada-logo.jpeg","contentUrl":"https:\/\/avada.io\/wp-content\/uploads\/2023\/06\/Avada-logo.jpeg","width":1200,"height":1200,"caption":"Avada Commerce"},"image":{"@id":"https:\/\/avada.io\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/avada.io\/","https:\/\/x.com\/avadaio","https:\/\/www.youtube.com\/@avadaio","https:\/\/www.linkedin.com\/company\/avadacommerce"]},{"@type":"Person","@id":"https:\/\/avada.io\/#\/schema\/person\/cc9c647e3ec94d00dc61ae2e653cafb7","name":"Sam","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/fdce01bbdb8b8eaa162f8ed372062707058abcd85e8b233af7cb4e01191c75f4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/fdce01bbdb8b8eaa162f8ed372062707058abcd85e8b233af7cb4e01191c75f4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fdce01bbdb8b8eaa162f8ed372062707058abcd85e8b233af7cb4e01191c75f4?s=96&d=mm&r=g","caption":"Sam"},"description":"Sam Nguyen is the CEO and founder of Avada Commerce, an e-commerce solution provider headquartered in Vietnam. He is an expert on the Shopify e-commerce platform for online stores and retail point-of-sale systems. Sam loves talking about e-commerce and he aims to help over a million online businesses grow and thrive.","sameAs":["https:\/\/wordpress-466542-3512282.cloudwaysapps.com","https:\/\/vn.linkedin.com\/in\/samng80"],"url":"https:\/\/avada.io\/authors\/sam\/"}]}},"meta_title":"Liquid asset_img_url: How to Get Asset Image URL in Shopify","meta_description":"Learn how to easily add images to your Shopify store's templates using the Liquid asset_img_url filter, enhancing visual appeal and brand consistency.","meta_keywords":"","feature_image_custom":"","updated_at_migrate":"2019-05-28T00:00:00+07:00","_links":{"self":[{"href":"https:\/\/avada.io\/wp-json\/wp\/v2\/posts\/111324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/avada.io\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/avada.io\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/avada.io\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/avada.io\/wp-json\/wp\/v2\/comments?post=111324"}],"version-history":[{"count":2,"href":"https:\/\/avada.io\/wp-json\/wp\/v2\/posts\/111324\/revisions"}],"predecessor-version":[{"id":159016,"href":"https:\/\/avada.io\/wp-json\/wp\/v2\/posts\/111324\/revisions\/159016"}],"wp:attachment":[{"href":"https:\/\/avada.io\/wp-json\/wp\/v2\/media?parent=111324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/avada.io\/wp-json\/wp\/v2\/categories?post=111324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/avada.io\/wp-json\/wp\/v2\/tags?post=111324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}