
🛍️ Building a Shopify Automation Script — Lessons & Setup Reference
What this doc is: A first-person reference log of everything I went through while building a Shopify product image optimization tool. The actual goal of the script doesn't matter — what matters is the journey to get the script talking to Shopify at all . These steps, challenges, and fixes will apply to almost any Shopify automation I build in the future. 🎯 What I Was Trying to Do My client had a Shopify store with 250+ products. Many product images were over 1MB in size, which was tanking their site performance. The goal was simple: automatically compress all images over 200KB down to under 200KB and re-upload them to Shopify — no manual work, no mistakes, fully automated. 🗂️ The Stack I Chose Runtime: Node.js (v20+) Language: TypeScript (with ts-node for running directly) Libraries: axios for HTTP, sharp for image compression Shopify interface: Shopify Admin REST API 📋 Step-by-Step: What I Did, What Broke, and How I Fixed It Step 1 — Writing the Script I started with a TypeScript scri
Continue reading on Dev.to Webdev
Opens in a new tab

