<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: daydayupc</title>
    <description>The latest articles on DEV Community by daydayupc (@daydayupc).</description>
    <link>https://dev.to/daydayupc</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4089993%2Fda7f8a1a-fe47-468e-84d5-96a523e625e8.png</url>
      <title>DEV Community: daydayupc</title>
      <link>https://dev.to/daydayupc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/daydayupc"/>
    <language>en</language>
    <item>
      <title>How to Format JSON: Pretty-Print Like a Pro (2026 Guide)</title>
      <dc:creator>daydayupc</dc:creator>
      <pubDate>Mon, 24 Aug 2026 13:06:07 +0000</pubDate>
      <link>https://dev.to/daydayupc/how-to-format-json-pretty-print-like-a-pro-2026-guide-3h0c</link>
      <guid>https://dev.to/daydayupc/how-to-format-json-pretty-print-like-a-pro-2026-guide-3h0c</guid>
      <description>&lt;h1&gt;
  
  
  How to Format JSON: Pretty-Print Like a Pro (2026 Guide)
&lt;/h1&gt;

&lt;p&gt;Formatting JSON means three different things depending on the situation: making it readable with indentation, validating that it's actually valid, and shrinking it for production. The one-liner that covers the first two on any machine: &lt;code&gt;python3 -m json.tool file.json&lt;/code&gt;. It pretty-prints &lt;em&gt;and&lt;/em&gt; validates in one pass, it's in the Python standard library, and it's been there since Python 2.6. I use it daily for API responses and config dumps, and it has never let me down.&lt;/p&gt;

&lt;p&gt;If you're in the browser instead, a JSON formatter tool does the same thing plus syntax highlighting — which becomes worth it the moment you're staring at a 2,000-line API response.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why JSON ends up unreadable in the first place
&lt;/h2&gt;

&lt;p&gt;Every API returns minified JSON. Every config file your tools emit is a single line. That's fine for machines — whitespace is meaningless to a parser — but it's brutal for humans. A 500 KB response with no indentation is unreadable; the same data with 2-space indents is a document you can actually navigate.&lt;/p&gt;

&lt;p&gt;Minified JSON also hides problems. A missing comma or a stray quote sits invisibly in a wall of text, but the moment you pretty-print, the parser has to understand the whole structure — and it will tell you exactly where it broke.&lt;/p&gt;

&lt;h2&gt;
  
  
  The built-in ways to format JSON
&lt;/h2&gt;

&lt;p&gt;You probably already have tools on your machine. No installs needed:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python (any machine with Python 3):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="nt"&gt;-m&lt;/span&gt; json.tool data.json            &lt;span class="c"&gt;# pretty-print to stdout&lt;/span&gt;
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; json.tool data.json &lt;span class="nt"&gt;--compact&lt;/span&gt;  &lt;span class="c"&gt;# minify instead&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Node.js (one-liner):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"const d=require('fs').readFileSync(0,'utf8');console.log(JSON.stringify(JSON.parse(d),null,2))"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;jq (the standard JSON Swiss Army knife):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jq &lt;span class="nb"&gt;.&lt;/span&gt; data.json        &lt;span class="c"&gt;# pretty-print&lt;/span&gt;
jq &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt; data.json     &lt;span class="c"&gt;# compact (minified)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All three validate while they format. If the input has a syntax error, you get a parse error with a line number instead of garbage output — which is the real value of "just formatting" something.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a good formatter does beyond indentation
&lt;/h2&gt;

&lt;p&gt;Indentation is the baseline. The tools worth keeping do three more things:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax validation with clear errors.&lt;/strong&gt; A good formatter parses the input properly (not regex-hacks it) and tells you &lt;em&gt;where&lt;/em&gt; the error is. "Expected ',' or '}' after property value at line 42" beats "invalid JSON" every time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Minify mode.&lt;/strong&gt; Same data, zero whitespace. This is what you ship to production — a payload that's often 20-40% smaller before you even enable gzip.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax highlighting.&lt;/strong&gt; Color-coded keys, strings, numbers and booleans make a 2,000-line response skimmable. It sounds cosmetic until you've debugged a nested config with it.&lt;/p&gt;

&lt;p&gt;Two options worth mentioning: key sorting (alphabetical keys make diffs and comparisons much easier) and indent size choice (2 spaces is the community default; 4 or tabs if your team's style guide says so). Neither changes the data — both change how fast you can read it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The workflow I actually use
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Paste the minified JSON or drop the file.&lt;/li&gt;
&lt;li&gt;If there's an error, read the line number it points at, fix the source, re-paste.&lt;/li&gt;
&lt;li&gt;Beautify at 2-space indent, turn on highlighting, scan the structure.&lt;/li&gt;
&lt;li&gt;When done, switch to minify and copy the compact version for the request body.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For the browser-based version, my tool &lt;a href="https://www.arktoolz.com/en/json-formatter" rel="noopener noreferrer"&gt;ArkToolz JSON formatter&lt;/a&gt; covers all of it: beautify and minify modes, 2/4/tab indent, recursive key sorting, syntax highlighting, and exact error messages with positions. It all runs locally in your browser — paste a 10 MB config and nothing leaves your machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  The JSON syntax rules people keep breaking
&lt;/h2&gt;

&lt;p&gt;JSON is strict by design (RFC 8259). The rules that bite people daily:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No trailing commas.&lt;/strong&gt; &lt;code&gt;{"a": 1,}&lt;/code&gt; is invalid. JavaScript objects allow it; JSON doesn't.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No single quotes.&lt;/strong&gt; &lt;code&gt;{'a': 1}&lt;/code&gt; is invalid. Only double quotes around keys and strings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No comments.&lt;/strong&gt; JSON has no comment syntax. If you're using &lt;code&gt;//&lt;/code&gt; in a config file, that's not JSON — it's a superset (like JSON5 or a JS object literal), and strict parsers will reject it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No undefined or functions.&lt;/strong&gt; JSON only supports objects, arrays, strings, numbers, booleans and null.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most "invalid JSON" errors in practice come from one of those four. Know them and you'll spot the problem before the formatter does.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Does formatting JSON change the data?&lt;/strong&gt;&lt;br&gt;
No. Pretty-printing only adds whitespace; minifying only removes it. The parsed structure is identical — which is exactly why validation happens at parse time, not format time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's the difference between JSON and a JavaScript object?&lt;/strong&gt;&lt;br&gt;
JSON is a text format with strict syntax rules; a JS object is an in-memory structure with more permissive syntax. &lt;code&gt;{a: 1}&lt;/code&gt; is a valid JS object literal but invalid JSON. The strictness is the point — JSON is designed to be parsed by any language, not just JavaScript.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is my API response still huge after minifying?&lt;/strong&gt;&lt;br&gt;
Minifying removes whitespace only (typically 20-40%). The real size reduction comes from gzip/brotli at the transport layer and from trimming redundant fields at the source.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I format JSON in the browser console?&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;console.log(JSON.stringify(data, null, 2))&lt;/code&gt; pretty-prints any JS object or parsed response. Most devtools also have a built-in "Response" tab that pretty-prints JSON automatically — check there before copying anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 30-second checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Valid JSON (no trailing commas, single quotes, or comments)&lt;/li&gt;
&lt;li&gt;[ ] 2-space indent for reading, minified for shipping&lt;/li&gt;
&lt;li&gt;[ ] Syntax highlighting on for large responses&lt;/li&gt;
&lt;li&gt;[ ] Key sorting on if you're diffing or comparing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Minified JSON is for machines; formatted JSON is for you. Validate with a proper parser, pretty-print at 2 spaces, and ship the minified version. A &lt;a href="https://www.arktoolz.com/en/json-formatter" rel="noopener noreferrer"&gt;free online JSON formatter&lt;/a&gt; does all of it in your browser — no install, no upload, exact error messages included.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>json</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to Merge PDF Files Free &amp; Privately (2026 Guide)</title>
      <dc:creator>daydayupc</dc:creator>
      <pubDate>Mon, 24 Aug 2026 09:23:10 +0000</pubDate>
      <link>https://dev.to/daydayupc/how-to-merge-pdf-files-free-privately-2026-guide-alg</link>
      <guid>https://dev.to/daydayupc/how-to-merge-pdf-files-free-privately-2026-guide-alg</guid>
      <description>&lt;h1&gt;
  
  
  How to Merge PDF Files Free &amp;amp; Privately (2026 Guide)
&lt;/h1&gt;

&lt;p&gt;The fastest way to merge PDFs in 2026 is a browser-based tool that processes files locally — no account, no upload, no 20 MB email limit. Drag your PDFs in, check the order, hit merge. A 10-page contract plus a 3-page signature page becomes one file in about five seconds. I've merged invoices, contracts and product spec sheets this way for years, and I've never had a reason to go back to desktop software.&lt;/p&gt;

&lt;p&gt;Before you merge anything, three things matter: the order of the files, the total size of the result, and whether any of your PDFs are locked. Everything else is just clicking.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why you end up with multiple PDFs in the first place
&lt;/h2&gt;

&lt;p&gt;It happens constantly. Your accountant sends a receipt as one PDF, your bank statement is another, and the signed version of the contract is a third. Email inboxes and download folders are full of single-page PDFs that were never meant to stay separate. Merging them isn't just tidier — it's practical: one file to send, one file to archive, one file to print.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to check before you merge
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Order.&lt;/strong&gt; The result reads top to bottom in the order you drop the files. Most tools let you reorder before merging — use it. Renaming files to force alphabetical order is a workaround, not a workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Size.&lt;/strong&gt; Merging doesn't compress. If you combine three 15 MB scanned PDFs, you get one ~45 MB file. If the result is going into an email or a marketplace upload, check the final size and compress the PDFs first if needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Locked files.&lt;/strong&gt; Some PDFs have restrictions set by the author. Good merging tools attempt the merge anyway and only warn you when a file genuinely can't be read. If one of your files is password-protected, you'll need the password before anything will work.&lt;/p&gt;

&lt;h2&gt;
  
  
  The main ways to merge PDFs, compared
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;Cost&lt;/th&gt;
&lt;th&gt;Privacy&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Browser-based tool (local processing)&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Files never leave your device&lt;/td&gt;
&lt;td&gt;Everyday merging, sensitive documents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Adobe Acrobat&lt;/td&gt;
&lt;td&gt;Paid subscription&lt;/td&gt;
&lt;td&gt;Uploads to Adobe servers&lt;/td&gt;
&lt;td&gt;Heavy PDF workflows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;macOS Preview&lt;/td&gt;
&lt;td&gt;Free (built-in)&lt;/td&gt;
&lt;td&gt;Local&lt;/td&gt;
&lt;td&gt;Occasional merges on a Mac&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Command line (pdfunite, PDFtk)&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Local&lt;/td&gt;
&lt;td&gt;Batch/automated merging&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud upload tools&lt;/td&gt;
&lt;td&gt;Free tier&lt;/td&gt;
&lt;td&gt;Files uploaded to servers&lt;/td&gt;
&lt;td&gt;When you don't care about privacy&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The privacy row is the one that decides it for most people. Contracts, invoices, tax documents — none of that should sit on a random server "for 24 hours" while some startup decides what to do with it. Browser-based tools that run entirely in JavaScript don't have this problem: the PDF never leaves your machine, and there's nothing to delete later because nothing was ever stored.&lt;/p&gt;

&lt;h2&gt;
  
  
  The exact workflow I use
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Drop the PDFs into the tool in the order I want them to appear.&lt;/li&gt;
&lt;li&gt;Check the page counts shown next to each file — it catches wrong files fast.&lt;/li&gt;
&lt;li&gt;Reorder with the up/down buttons if the drop order was wrong.&lt;/li&gt;
&lt;li&gt;Merge and download the single result.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For the occasional terminal merge, &lt;a href="https://manpages.debian.org/bookworm/poppler-utils/pdfunite.1.en.html" rel="noopener noreferrer"&gt;pdfunite&lt;/a&gt; from poppler-utils does the same thing in one line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pdfunite contract.pdf signature.pdf final.pdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the whole command. It works on Linux and macOS, and on Windows via WSL.&lt;/p&gt;

&lt;p&gt;If you'd rather stay in the browser, my tool &lt;a href="https://www.arktoolz.com/en/pdf-merge" rel="noopener noreferrer"&gt;ArkToolz PDF merge&lt;/a&gt; follows the exact workflow above: batch upload, per-file page counts, drag-free ordering with up/down buttons, and the merge happens locally in your browser — the files never touch a server. No signup, no size limit beyond what your browser can handle, and it's free.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four mistakes I see people make
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Merging in the wrong order.&lt;/strong&gt; The bank statement ends up before the cover letter. Check the order before you click merge, not after.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Merging without checking size.&lt;/strong&gt; Three large scans become one file that bounces off every email limit. Compress first when the result matters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Using a cloud uploader for sensitive files.&lt;/strong&gt; Tax returns and signed contracts don't belong on a random server, even temporarily.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Re-merging merged files.&lt;/strong&gt; If you merge A+B, then merge that result with C, you're re-encoding pages and risking quality drift. Always merge from the originals.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Does merging PDFs reduce quality?&lt;/strong&gt;&lt;br&gt;
No. A proper merge tool copies the pages as-is — it doesn't re-encode or compress them. The result is byte-identical in quality to the originals. (This is also why merging doesn't shrink file size.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I merge password-protected PDFs?&lt;/strong&gt;&lt;br&gt;
Only if you have the password. Without it, the file can't be read, and no legitimate tool will bypass that. Some tools can merge PDFs with certain permission restrictions, but encryption always needs the password.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is it safe to merge PDFs online?&lt;/strong&gt;&lt;br&gt;
It depends on the tool. If the tool processes files in your browser without uploading them, yes — that's the safest option available. If the tool asks you to upload files to a server, you're trusting that server with your documents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's the largest PDF I can merge?&lt;/strong&gt;&lt;br&gt;
With browser-based tools, the limit is your browser's memory rather than an artificial cap. If the merged file is huge, split the job into smaller batches.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 30-second checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] PDFs in the right order&lt;/li&gt;
&lt;li&gt;[ ] No password-protected files (or password ready)&lt;/li&gt;
&lt;li&gt;[ ] Final size fits your destination (email, upload, print)&lt;/li&gt;
&lt;li&gt;[ ] Sensitive files merged in a local/browser tool, not a cloud uploader&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Merging PDFs is a two-minute job when you have the right tool and the wrong one is a whole afternoon. Order first, check the size, keep it local. A &lt;a href="https://www.arktoolz.com/en/pdf-merge" rel="noopener noreferrer"&gt;free online PDF merger&lt;/a&gt; does all of it in your browser — no upload, no signup, no servers involved.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>productivity</category>
      <category>pdf</category>
    </item>
    <item>
      <title>How to Compress Product Images for Ecommerce (2026 Guide)</title>
      <dc:creator>daydayupc</dc:creator>
      <pubDate>Mon, 24 Aug 2026 08:47:37 +0000</pubDate>
      <link>https://dev.to/daydayupc/how-to-compress-product-images-for-ecommerce-2026-guide-2i87</link>
      <guid>https://dev.to/daydayupc/how-to-compress-product-images-for-ecommerce-2026-guide-2i87</guid>
      <description>&lt;h1&gt;
  
  
  How to Compress Product Images for Ecommerce (2026 Guide)
&lt;/h1&gt;

&lt;p&gt;Here's the version I'd give any seller who asks: resize product photos to 1600-2048 px on the longest side, export as JPEG (or WebP if your platform serves it), and set quality to 75-80. That turns a typical 5 MB camera export into a 150-300 KB file with zero visible difference, even at full zoom. Your store gets faster, your Core Web Vitals stop crying, and no platform rejects your uploads.&lt;/p&gt;

&lt;p&gt;I've helped set up stores on Shopify, Amazon and Etsy, and the same three knobs — size, format, quality — solve almost every image problem sellers hit. The platform limits below just tell you where the ceiling is; the compression settings tell you where to actually aim.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why your product photos are 5 MB in the first place
&lt;/h2&gt;

&lt;p&gt;Phone cameras and entry-level DSLRs default to huge resolutions. A 48-megapixel phone photo lands at 5-8 MB straight out of the camera. But here's the thing: the largest any storefront will ever display that image is about 2048 px wide, and most thumbnails are under 600 px.&lt;/p&gt;

&lt;p&gt;That gap between what the sensor captured and what the page renders is where almost all the wasted bytes live. Close it once and you're done — no need to obsess over every slider afterward.&lt;/p&gt;

&lt;p&gt;The cost of skipping this is real. Google's own research found that 53% of mobile visits are abandoned when a page takes longer than 3 seconds to load, and Amazon published a study estimating that every 100 ms of added latency costs them 1% of sales. Slow product images are a direct tax on your conversion rate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Platform image limits, checked against seller rules
&lt;/h2&gt;

&lt;p&gt;Every marketplace has its own upload limits. Here's what the current seller rules actually say (verified against platform documentation in 2026):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Platform&lt;/th&gt;
&lt;th&gt;Recommended size&lt;/th&gt;
&lt;th&gt;Upload limit&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Shopify&lt;/td&gt;
&lt;td&gt;2048×2048 px (square)&lt;/td&gt;
&lt;td&gt;4472×4472 px or 20 MP, max 20 MB&lt;/td&gt;
&lt;td&gt;Zoom needs ≥800×800 px&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Amazon&lt;/td&gt;
&lt;td&gt;≥1000 px longest side&lt;/td&gt;
&lt;td&gt;Max 10000 px longest side&lt;/td&gt;
&lt;td&gt;Main image must be pure white (RGB 255,255,255)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Etsy&lt;/td&gt;
&lt;td&gt;2400×2400 px&lt;/td&gt;
&lt;td&gt;Min 635×635 px&lt;/td&gt;
&lt;td&gt;1:1 ratio, JPEG preferred&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;eBay&lt;/td&gt;
&lt;td&gt;1600×1600 px&lt;/td&gt;
&lt;td&gt;Min 500×500 px, &amp;lt;12 MB&lt;/td&gt;
&lt;td&gt;JPEG preferred, zoom works at 1600 px&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AliExpress&lt;/td&gt;
&lt;td&gt;1000×1000 px&lt;/td&gt;
&lt;td&gt;&amp;lt;5 MB per image&lt;/td&gt;
&lt;td&gt;800×800 px minimum&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shopee&lt;/td&gt;
&lt;td&gt;1000×1000 px&lt;/td&gt;
&lt;td&gt;&amp;lt;2 MB&lt;/td&gt;
&lt;td&gt;800×800 px minimum&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two patterns jump out. First, every platform's &lt;em&gt;minimum&lt;/em&gt; is small (500-1000 px), but zoom features only kick in at 1000-2048 px — so shipping 1600-2048 px covers everyone. Second, the upload limits are all in megabytes, but the limits that actually matter for page speed are in kilobytes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three-knob method: size, format, quality
&lt;/h2&gt;

&lt;p&gt;I compress product photos in this exact order, every time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Resize to the display size, not the camera size.&lt;/strong&gt; Set the longest side to 1600-2048 px for main product images, and 800-1000 px for lifestyle shots that only appear inline. A 4000 px photo displayed at 1200 px is roughly 80% wasted data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Pick the format before touching quality.&lt;/strong&gt; JPEG for anything photographic — it's what Shopify, Amazon and Etsy all recommend. WebP is 25-35% smaller than JPEG at the same quality and Shopify serves it automatically on supporting browsers, but many marketplaces still want a JPEG upload, so compress to JPEG and let the platform handle delivery. PNG is only worth it for images with transparency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Set quality to 75-80, never 100.&lt;/strong&gt; Quality 100 on a JPEG is mostly wasted bytes preserving artifacts nobody can see. Between 75 and 80, the difference from the original is invisible in normal viewing. I've A/B tested this with store owners who insisted they could spot compression artifacts at 400% zoom — at 100% zoom on a product page, none of them could.&lt;/p&gt;

&lt;h2&gt;
  
  
  A concrete example
&lt;/h2&gt;

&lt;p&gt;A typical seller workflow: a 6 MB photo from a phone, destined for a Shopify product page at 2048×2048.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Resize to 2048 px longest side — drops to about 1.8 MB.&lt;/li&gt;
&lt;li&gt;Convert to JPEG, quality 78 — drops to about 250 KB.&lt;/li&gt;
&lt;li&gt;Upload. Done. The page loads three times faster, the zoom feature still works, and nobody can tell the file used to be 6 MB.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want to do all three steps in one go without installing anything, my tool &lt;a href="https://www.arktoolz.com/en/image-compressor" rel="noopener noreferrer"&gt;ArkToolz image compressor&lt;/a&gt; handles resize + format + quality together in the browser. Files never leave your device, and batch mode processes a whole product catalog folder at once — which is exactly what you want when you have 200 SKUs and one deadline.&lt;/p&gt;

&lt;h2&gt;
  
  
  Five mistakes I see sellers make
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Uploading the original camera file.&lt;/strong&gt; The platform will accept it, then serve it slowly to every visitor. Compress before uploading, always.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compressing an already-compressed file.&lt;/strong&gt; Every lossy pass adds artifacts. Always compress from the original export.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chasing quality 100.&lt;/strong&gt; You can't see the difference on a product page, but your visitors can feel the load time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ignoring EXIF data.&lt;/strong&gt; GPS coordinates and camera metadata hide kilobytes inside every photo. Most compressors strip it automatically — make sure yours does.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Using one giant image for thumbnails.&lt;/strong&gt; Your 2048 px main image gets scaled down by the theme for the collection grid, but the browser still downloads the full file. If your platform doesn't auto-generate thumbnails, export a separate 400-600 px version for grids.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What's the best image size for Shopify products?&lt;/strong&gt;&lt;br&gt;
2048×2048 px — it's what Shopify recommends, it enables the zoom feature, and it's large enough for any future use. Don't go near the 4472×4472 px ceiling; you're just shipping extra bytes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does Amazon really require a white background?&lt;/strong&gt;&lt;br&gt;
For the main image, yes. Amazon's rule is a pure white background (RGB 255,255,255) with no text, logos or watermarks on the product. Secondary images can be lifestyle shots.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JPEG or PNG for product photos?&lt;/strong&gt;&lt;br&gt;
JPEG, almost always. It's the format every marketplace recommends and it gives you the 60-90% size reduction you need. PNG is only for transparent-background images, which most marketplaces don't even allow for main images.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I compress images without losing quality?&lt;/strong&gt;&lt;br&gt;
Yes, if you compress from the original and stay at quality 75-80. Lossless formats like PNG keep every pixel but only save 10-40%; a well-tuned JPEG saves 60-90% with no visible loss.&lt;/p&gt;

&lt;h2&gt;
  
  
  The two-minute checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Longest side 1600-2048 px (800-1000 px for inline shots)&lt;/li&gt;
&lt;li&gt;[ ] JPEG quality 75-80, or WebP if your platform serves it&lt;/li&gt;
&lt;li&gt;[ ] EXIF stripped&lt;/li&gt;
&lt;li&gt;[ ] Final file under 300 KB per image&lt;/li&gt;
&lt;li&gt;[ ] Separate small version for grids if your platform needs it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Compress from the original, stay in the 75-80 band, and your store gets faster without anyone noticing the difference. A &lt;a href="https://www.arktoolz.com/en/image-compressor" rel="noopener noreferrer"&gt;free online image compressor&lt;/a&gt; applies the whole checklist in your browser — no uploads, no signup, batch mode included.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>webperf</category>
      <category>shopify</category>
    </item>
    <item>
      <title>Compressing Images Without Losing Quality: What Actually Works in 2026</title>
      <dc:creator>daydayupc</dc:creator>
      <pubDate>Sat, 22 Aug 2026 17:43:38 +0000</pubDate>
      <link>https://dev.to/daydayupc/compressing-images-without-losing-quality-what-actually-works-in-2026-6l6</link>
      <guid>https://dev.to/daydayupc/compressing-images-without-losing-quality-what-actually-works-in-2026-6l6</guid>
      <description>&lt;h1&gt;
  
  
  Compressing Images Without Losing Quality: What Actually Works in 2026
&lt;/h1&gt;

&lt;p&gt;The short version: set quality to 75-80, resize the image to the width it's actually displayed at, and use WebP or AVIF when the destination allows it. That gets most photos from multi-megabyte files down to 100-300 KB with zero visible difference.&lt;/p&gt;

&lt;p&gt;I've shipped images this way on production sites for years, and I've A/B tested the settings below with designers who swear they can tell "quality loss" apart at 400% zoom. The numbers hold up. Here's the whole field guide.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why your 4 MB photo is 4 MB in the first place
&lt;/h2&gt;

&lt;p&gt;Modern phone cameras default to 48-megapixel photos. One shot from an iPhone 15/16 Pro or a Galaxy S-series lands at 5-8 MB before you do anything to it. Meanwhile the biggest any web page will ever display that image is usually 1200-2000 pixels wide.&lt;/p&gt;

&lt;p&gt;So you're shipping 48 megapixels to show about 2. That gap — between what the sensor captured and what the screen can render — is where almost all the wasted bytes live. Shrink it once and you barely need to obsess over the rest.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lossy vs lossless: there are only two buckets
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Lossless&lt;/strong&gt; keeps every pixel intact. File sizes drop 10-40%. PNG, GIF, and lossless WebP work this way. Right choice for logos, screenshots, and anything with text or sharp edges.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lossy&lt;/strong&gt; discards tiny color and detail variations your eyes rarely register. File sizes drop 60-90%. JPEG, lossy WebP, and AVIF work this way. Right choice for photos.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The trap people fall into: they think "quality 100" is the safe option. It isn't. A JPEG at quality 100 is mostly wasted data — the encoder is preserving artifacts you can't see. The real skill is finding the &lt;strong&gt;lowest&lt;/strong&gt; quality number where you can't see a difference, not the highest one where you can. For photos that number is almost always 75-80.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pick the format first, compress second
&lt;/h2&gt;

&lt;p&gt;Choosing the format does half the work before you touch a single slider:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Format&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;th&gt;Typical savings&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;JPEG&lt;/td&gt;
&lt;td&gt;Photos, web, email&lt;/td&gt;
&lt;td&gt;60-80% at quality 80&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PNG&lt;/td&gt;
&lt;td&gt;Logos, screenshots, transparency&lt;/td&gt;
&lt;td&gt;10-40% (lossless)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WebP&lt;/td&gt;
&lt;td&gt;Modern websites&lt;/td&gt;
&lt;td&gt;25-35% smaller than JPEG at the same quality&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AVIF&lt;/td&gt;
&lt;td&gt;Modern browsers&lt;/td&gt;
&lt;td&gt;roughly half of JPEG at the same quality&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SVG&lt;/td&gt;
&lt;td&gt;Icons, vector art&lt;/td&gt;
&lt;td&gt;tiny, infinitely scalable&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;WebP is supported in every modern browser (&lt;a href="https://caniuse.com/webp" rel="noopener noreferrer"&gt;caniuse&lt;/a&gt; lists it as green across the board), and AVIF covers everything except older Safari versions. The easiest win on the web: serve AVIF or WebP with a JPEG fallback and let the browser decide:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;picture&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;source&lt;/span&gt; &lt;span class="na"&gt;srcset=&lt;/span&gt;&lt;span class="s"&gt;"photo.avif"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"image/avif"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;source&lt;/span&gt; &lt;span class="na"&gt;srcset=&lt;/span&gt;&lt;span class="s"&gt;"photo.webp"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"image/webp"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"photo.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Your photo"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"1920"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"1080"&lt;/span&gt; &lt;span class="na"&gt;loading=&lt;/span&gt;&lt;span class="s"&gt;"lazy"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/picture&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That snippet alone will cut your image payload by 50-70% on most browsers, and nobody who visits your site will ever know the difference.&lt;/p&gt;

&lt;h2&gt;
  
  
  The exact settings I use
&lt;/h2&gt;

&lt;p&gt;These are the numbers I actually ship with, not the ones from a random blog post:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Quality: 75-80.&lt;/strong&gt; Start at 80 for photos. Below 60, smooth gradients start to band and edges get crunchy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Width: the display width.&lt;/strong&gt; Resize to the largest size the image will ever be shown at. A 4000px photo displayed at 1200px is about 80% waste.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Format: WebP or AVIF when possible, JPEG otherwise.&lt;/strong&gt; For screenshots and logos: PNG or lossless WebP — never lossy.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you'd rather stay in the terminal, &lt;a href="https://imagemagick.org/" rel="noopener noreferrer"&gt;ImageMagick&lt;/a&gt; does all three in one line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;magick photo.jpg &lt;span class="nt"&gt;-quality&lt;/span&gt; 80 &lt;span class="nt"&gt;-resize&lt;/span&gt; 1920x1920&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; photo.webp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or in Python with &lt;a href="https://python-pillow.org/" rel="noopener noreferrer"&gt;Pillow&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;PIL&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Image&lt;/span&gt;

&lt;span class="n"&gt;img&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;photo.jpg&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;convert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;RGB&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;img&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;thumbnail&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="mi"&gt;1920&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1920&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;          &lt;span class="c1"&gt;# resize to display size
&lt;/span&gt;&lt;span class="n"&gt;img&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;photo.webp&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;WEBP&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;quality&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;method&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# method=6 = slowest, best compression
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And if you want a browser-only option, my tool &lt;a href="https://www.arktoolz.com/en/image-compressor" rel="noopener noreferrer"&gt;ArkToolz image compressor&lt;/a&gt; does the same thing in the browser — no upload, the file never leaves your device, batch mode handles a whole folder at once.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four mistakes I see everywhere
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Quality 100.&lt;/strong&gt; Wasted bytes, no visible benefit. Start at 80 and step down until you notice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recompressing an already-compressed file.&lt;/strong&gt; Each lossy pass adds artifacts. Always compress from the original.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ignoring EXIF.&lt;/strong&gt; GPS, camera model, timestamps — that's kilobytes of metadata hiding in every photo. Most decent compressors strip it automatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deleting the original.&lt;/strong&gt; Compression edits a copy, never the source. Storage is cheap; reshoots are not.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Does compressing an image ruin the quality?&lt;/strong&gt;&lt;br&gt;
Only if you push lossy compression too far. Between 75-80, the difference is invisible to the human eye. Lossless compression doesn't touch quality at all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's the best format for photos in 2026?&lt;/strong&gt;&lt;br&gt;
WebP at quality 80 is the best size-to-quality balance in most browsers right now. AVIF is smaller still if your audience runs modern browsers. For screenshots and text-heavy images, PNG or lossless WebP.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can a 5 MB photo really become 100 KB?&lt;/strong&gt;&lt;br&gt;
Often yes — but usually it takes two levers at once: quality around 75 plus resizing to display width. Either one alone might not get you there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Go compress something
&lt;/h2&gt;

&lt;p&gt;Format first, then quality 75-80, then display size. That's the whole playbook. A &lt;a href="https://www.arktoolz.com/en/image-compressor" rel="noopener noreferrer"&gt;free online image compressor&lt;/a&gt; applies all three in one go, right in your browser — drop a file in and watch it come back 60-90% smaller while the quality stays put.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article was originally published on the &lt;a href="https://www.arktoolz.com/en/blog/compress-images-without-losing-quality" rel="noopener noreferrer"&gt;ArkToolz blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>webperf</category>
      <category>tutorial</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
