FROM CACHE - en_header

How to make a linka direct download PNG or PDF?

New Member
2 0 0



I use the Minimal theme and recently i've been working with a friend making this page inside my clothing store website. Its a "coupon" type page. We are struggling figuring out how to make a link  a direct download for anyone who click it.


For anyone that is kind to help me please you have to login before you can see the link. You just have to click "obtener descuento" and then "descargar cupon". This last one is the one we want to be a direct download link instead of another tab.


Thank you so much!

Replies 5 (5)
Shopify Partner
55 2 10

Having to create an account and login to see the page will likely discourage people from helping. 


In either case the first thing to do is  upload the PDF to your site. After uploading you can get the URL of the asset (see the documentation I just linked) to.


Is the page you want the link to appear on a Page or a part of product Liquid template?


If a Page, see the section here on adding a link.


If it's in Liquid you'll have to add the following to the appropriate template:


{{ 'Download Coupon' | link_to: '' }}


Or if the PDF's contents can change often but file's name remains the same:


{% assign pdf = 'size-chart.pdf' | file_url %}
{{ 'Download Coupon' | link_to: pdf }}


Software Development & Consulting
33 0 13

Thanks for the instructions and links - easy to follow !

New Member
1 0 0

Hi all,

Could you please let me know how to create a download link that customer can directly download the file when they click on the link rather than opening inside the browser.

For example as below image, customer clicks on the "size guide", then the PDF file can be downloaded directly, rather than opening a new browswer, and click download button inside.

Thank you.

ps, here is my store: www,limkoocycling,com in debut shopify.

Shopify Expert
189 1 51

the only way to force the download would be to have it in a ZIP folder - shopify serves all its images and files from their CDN which disqualifies it from instant download markup. You would need to zip the file/files into a .zip format and then link to that in your code.


* Chrome 65+ and Firefox only support same-origin download links.

Shopify Partner
2017 361 496



This is doable in Shopify. Please check the video for more info.


Just be reminded that we are volunteering to help.



 Accept as Solution

  will be much appreciated.✌-✿✿✿
For more Shopify Solutions and custom codes, just visit

 Made4Uo's website

Keep your stuffs private. Refrain from giving unnecessary access to your store.