<?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: eden zhang</title>
    <description>The latest articles on DEV Community by eden zhang (@eden_zhang).</description>
    <link>https://dev.to/eden_zhang</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%2F3006383%2F10d76915-5069-4283-a993-5fbc110c66de.png</url>
      <title>DEV Community: eden zhang</title>
      <link>https://dev.to/eden_zhang</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eden_zhang"/>
    <language>en</language>
    <item>
      <title>Re-downloading the Same 20,000 Images Every Night: Conditional Requests, If-Range and Resumable Downloads in the Browser</title>
      <dc:creator>eden zhang</dc:creator>
      <pubDate>Wed, 25 Nov 2026 02:07:43 +0000</pubDate>
      <link>https://dev.to/eden_zhang/re-downloading-the-same-20000-images-every-night-conditional-requests-if-range-and-resumable-11dj</link>
      <guid>https://dev.to/eden_zhang/re-downloading-the-same-20000-images-every-night-conditional-requests-if-range-and-resumable-11dj</guid>
      <description>&lt;p&gt;A collector that runs on a schedule has a boring failure mode, and it is not a bug in the parser. It is the network.&lt;/p&gt;

&lt;p&gt;The first run is pleasant. You point the crawler at a gallery site, it walks the DOM, resolves a few thousand image URLs, and downloads them at whatever concurrency the tabs allow. Three seconds per image, most of it spent on a 200 response that hands you bytes you already had on disk from the previous run. Run it nightly and you are spending your bandwidth, your target site's bandwidth and your rate-limit budget re-fetching an archive that changed by forty files.&lt;/p&gt;

&lt;p&gt;The fix is not "check the file size before downloading". It is HTTP cache revalidation plus byte-range resume, and in a browser both are awkward enough that most extensions skip them entirely.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the response headers actually promise
&lt;/h2&gt;

&lt;p&gt;Every download carries a validator. Two kinds matter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ETag&lt;/strong&gt; — an opaque string the server assigns. &lt;code&gt;"abc123"&lt;/code&gt; is a strong validator, &lt;code&gt;W/"abc123"&lt;/code&gt; is weak, and the &lt;code&gt;W/&lt;/code&gt; prefix is not decoration: a weak validator only promises &lt;em&gt;semantic&lt;/em&gt; equivalence, so it is legal for a 304 check and illegal for a range resume.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Last-Modified&lt;/strong&gt; — a timestamp, at best one-second resolution, and therefore weaker than any ETag in practice.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On the next run you send &lt;code&gt;If-None-Match: "abc123"&lt;/code&gt; and, if you only have the timestamp, &lt;code&gt;If-Modified-Since: Tue, 24 Nov 2026 09:14:00 GMT&lt;/code&gt;. When the validator still matches, the server answers &lt;code&gt;304 Not Modified&lt;/code&gt; with no body. Per RFC 9110, a 304 must not carry a body, and a recipient is expected to merge the new headers into the stored representation rather than replace the metadata wholesale. If you naively overwrite your cached entry with the 304's headers, you throw away &lt;code&gt;Content-Length&lt;/code&gt; and &lt;code&gt;Content-Type&lt;/code&gt; and your local copy becomes unusable even though the bytes on disk are perfectly fine.&lt;/p&gt;

&lt;p&gt;The other half is freshness: &lt;code&gt;Cache-Control: max-age=86400&lt;/code&gt; means you do not need to revalidate at all inside that window, &lt;code&gt;immutable&lt;/code&gt; means the resource will never change at that URL (so even a reload skips revalidation), and &lt;code&gt;no-cache&lt;/code&gt; is the confusing one — it does not mean "do not store", it means "store, but revalidate before every reuse". A collecting tool wants the opposite of what a browser wants: browsers may serve stale images to avoid a request, while a collector must never accept stale bytes for a file it believes it just captured.&lt;/p&gt;

&lt;p&gt;And then &lt;code&gt;Vary&lt;/code&gt;. If the response says &lt;code&gt;Vary: Accept&lt;/code&gt; or &lt;code&gt;Vary: User-Agent&lt;/code&gt;, the same URL can legitimately yield different bytes to different clients, so a validator is only meaningful inside the exact request context that produced it. CDNs serving AVIF to modern clients and JPEG to old ones use exactly this, which is why the same gallery URL can hand you &lt;code&gt;image/avif&lt;/code&gt; on one run and &lt;code&gt;image/jpeg&lt;/code&gt; on the next.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ranges, and what If-Range is for
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Accept-Ranges: bytes&lt;/code&gt; advertises that the origin understands byte ranges, and a well-formed request looks like &lt;code&gt;Range: bytes=0-1048575&lt;/code&gt;. A successful partial answer is &lt;code&gt;206 Partial Content&lt;/code&gt; with &lt;code&gt;Content-Range: bytes 0-1048575/6291456&lt;/code&gt; — the total after the slash is the full resource length, and that number is the only trustworthy way to know how much is left. A request past the end of the resource returns &lt;code&gt;416 Range Not Satisfiable&lt;/code&gt; with &lt;code&gt;Content-Range: bytes */6291456&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The trap is resume. Suppose you cached the first 1 MB of a 6 MB image last night and the file has since been replaced on the server. Sending &lt;code&gt;Range: bytes=1048576-&lt;/code&gt; alone gives you bytes from the &lt;em&gt;new&lt;/em&gt; file appended to the old prefix — a corrupt image that decodes into confetti. That is what &lt;code&gt;If-Range&lt;/code&gt; prevents: send &lt;code&gt;If-Range: "abc123"&lt;/code&gt; with your strong ETag and the server either resumes (206) or, if the validator changed, ignores the range and answers &lt;code&gt;200 OK&lt;/code&gt; with the entire body, which is exactly the safe fallback. Two rules that bite people:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;If-Range&lt;/code&gt; accepts an ETag &lt;strong&gt;or&lt;/strong&gt; an HTTP-date, never both, and the date form requires the origin to be able to tell "unmodified" without ambiguity — one-second granularity makes it risky.&lt;/li&gt;
&lt;li&gt;Only a &lt;strong&gt;strong&lt;/strong&gt; validator is legal here. A weak &lt;code&gt;W/"..."&lt;/code&gt; must not be used with &lt;code&gt;If-Range&lt;/code&gt;; if you do, servers are free to honour it and hand you mismatched bytes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Multi-range requests (&lt;code&gt;bytes=0-100,500-600&lt;/code&gt;) are advisory, may come back as &lt;code&gt;multipart/byteranges&lt;/code&gt; or as a plain 200, and are not worth implementing in a collector.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting this right in a browser extension
&lt;/h2&gt;

&lt;p&gt;You cannot spawn &lt;code&gt;curl&lt;/code&gt;. What you have is &lt;code&gt;fetch&lt;/code&gt; with &lt;code&gt;AbortController&lt;/code&gt;, a &lt;code&gt;ReadableStream&lt;/code&gt; body, IndexedDB for the bytes, and a background service worker that may be killed mid-flight.&lt;/p&gt;

&lt;p&gt;A workable shape for one asset:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;cached&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;idb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;           &lt;span class="c1"&gt;// {etag, size, chunks[], contentType}&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;headers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cached&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;etag&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"If-None-Match"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cached&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;etag&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cached&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;etag&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;cached&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;cached&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"If-Range"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cached&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;etag&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"Range"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sb"&gt;`bytes=${cached.size}-`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ac&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;AbortController&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ac&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;credentials&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"include"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;304&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cached&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fresh&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;206&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cached&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;// verify Content-Range total&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;store&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;            &lt;span class="c1"&gt;// validator changed: start over&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each branch has its own hazards, and they only show up in production:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A CDN that ignores &lt;code&gt;Range&lt;/code&gt;&lt;/strong&gt; answers 200 with the whole file. Appending that to an existing prefix corrupts the asset, so the 200 branch must always discard cached chunks rather than assume "the server sent me the rest".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Content-Encoding: gzip&lt;/code&gt;&lt;/strong&gt; breaks byte arithmetic. If the origin compresses a response, the range applies to the encoded representation and &lt;code&gt;Content-Length&lt;/code&gt; describes the compressed size, so a resumed prefix plus a new suffix is not the concatenation you think it is. Send &lt;code&gt;Accept-Encoding: identity&lt;/code&gt; for binary assets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Signed URLs&lt;/strong&gt; that change per request — token in the query string — usually change the ETag too, which silently defeats revalidation: every run looks like a brand-new file. If the path is stable, key the cache on the &lt;em&gt;path&lt;/em&gt;, not the full URL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HEAD is not a probe.&lt;/strong&gt; Plenty of image CDNs answer &lt;code&gt;HEAD&lt;/code&gt; without &lt;code&gt;Accept-Ranges&lt;/code&gt; or without &lt;code&gt;Content-Length&lt;/code&gt;, so discovering range support via a HEAD costs one request and often returns nothing useful.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The service worker gets killed.&lt;/strong&gt; Manifest V3 event pages terminate, and a half-written IndexedDB transaction that was supposed to be atomic leaves you with a fragment that claims its full length. Persist progress in a separate metadata record, and reconcile &lt;code&gt;Content-Range&lt;/code&gt; against it before trusting anything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Concurrency duplicates work.&lt;/strong&gt; Two tabs crawling the same page enqueue the same URL; without a per-URL in-flight lock in a shared worker, both write the same chunks and one clobbers the other.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do this for twenty thousand images and the accounting is unforgiving: every resume needs a validator, every validator needs a cache entry with normalised keys, every cache entry needs garbage collection, and the whole thing has to survive a killed worker without silently producing truncated JPEGs that only fail when someone opens the file three weeks later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where OmniPic fits
&lt;/h2&gt;

&lt;p&gt;That is the entire scaffolding I ended up building: a persistent local index, strong-validator revalidation, byte-range resume, content-addressed dedupe, and a worker that survives being torn down. &lt;strong&gt;OmniPic AI Studio Pro&lt;/strong&gt; ships it as an extension, so the crawl-and-store loop already behaves this way on the sites you visit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Faka.doubaocdn.com%2Fs%2FUjWreeoKyw" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Faka.doubaocdn.com%2Fs%2FUjWreeoKyw" alt="OmniPic AI Studio Pro — site-wide scan view with collected assets, filters and per-asset controls" width="800" height="1067"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It walks the whole page — including lazy-loaded and CSS-background images — normalises thumbnail URLs back to the original CDN assets on Alibaba OSS, Tencent COS and Qiniu, and keeps everything in a local index with 100% on-device processing, so no bytes and no browsing history leave your machine. Near-duplicates collapse onto a single entry via 64-bit perceptual hashing, and when you are done the batch export streams an archive of two thousand-plus files without holding the whole set in memory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Faka.doubaocdn.com%2Fs%2FDVf6BES1dL" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Faka.doubaocdn.com%2Fs%2FDVf6BES1dL" alt="OmniPic AI Studio Pro — hover-to-save overlay for capturing a single image on the spot" width="1536" height="2048"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On top of that: reverse image search running entirely on-device (MobileNet features with WebGPU acceleration), one-click export into Eagle or Billfish, and a ZIP pipeline that streams to disk instead of buffering in RAM.&lt;/p&gt;

&lt;p&gt;The extension is live on &lt;strong&gt;Chrome, Edge and Firefox&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chromewebstore.google.com/detail/omnipic-studio-pro/cokoeaaaglgcljahaffjeijomhmkljlc" rel="noopener noreferrer"&gt;https://chromewebstore.google.com/detail/omnipic-studio-pro/cokoeaaaglgcljahaffjeijomhmkljlc&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A short checklist
&lt;/h2&gt;

&lt;p&gt;If you are writing your own collector, keep these four habits: send &lt;code&gt;If-None-Match&lt;/code&gt; on every repeat visit and merge 304 headers instead of replacing them, use &lt;code&gt;If-Range&lt;/code&gt; with a strong ETag whenever you resume, request &lt;code&gt;Accept-Encoding: identity&lt;/code&gt; for binary assets, and treat &lt;code&gt;Content-Range&lt;/code&gt;'s total as the authority over your own bookkeeping. Everything else — dedupe, export, library integration — can come later, once you are no longer paying for the same megabyte twice.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>http</category>
      <category>browser</category>
    </item>
    <item>
      <title>Your Downloaded Images Are Sideways: Parsing EXIF Orientation in JPEG, WebP and AVIF</title>
      <dc:creator>eden zhang</dc:creator>
      <pubDate>Tue, 24 Nov 2026 02:38:11 +0000</pubDate>
      <link>https://dev.to/eden_zhang/your-downloaded-images-are-sideways-parsing-exif-orientation-in-jpeg-webp-and-avif-2895</link>
      <guid>https://dev.to/eden_zhang/your-downloaded-images-are-sideways-parsing-exif-orientation-in-jpeg-webp-and-avif-2895</guid>
      <description>&lt;p&gt;Every image collector eventually ships a bug report that reads like this: "the images I downloaded are rotated 90 degrees." And every developer answers it once with "that's just how the camera saved it", and then spends three hours discovering that it is not that simple.&lt;/p&gt;

&lt;p&gt;The pixels on disk are not rotated. The file &lt;em&gt;declares&lt;/em&gt; a rotation. Two different consumers — your browser, your image viewer, your design tool — disagree about whether to apply that declaration, and the one that disagrees with your pipeline is the one your user opens first.&lt;/p&gt;

&lt;p&gt;This post is about where that declaration lives, byte by byte, in JPEG, WebP and AVIF, what browsers actually do with it, and why "just rotate it afterwards" is a trap that produces double-rotated images in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  The photo was never sideways
&lt;/h2&gt;

&lt;p&gt;A modern phone camera has a sensor that is physically landscape. When you hold the phone upright, the sensor still records a 4032 × 3024 landscape frame; the firmware then writes &lt;code&gt;Orientation = 6&lt;/code&gt; into the EXIF block, meaning "the viewer should rotate this 90° clockwise to display it correctly". The JPEG bitstream is untouched. Decode it with an orientation-unaware decoder and you get a correctly-exposed, correctly-colored, sideways photo.&lt;/p&gt;

&lt;p&gt;That single integer is the entire problem. It is also, in practice, the most common metadata field in the world of image tooling that gets dropped, duplicated, or applied twice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the flag lives: JPEG
&lt;/h2&gt;

&lt;p&gt;JPEG is a marker stream. &lt;code&gt;FF D8&lt;/code&gt; (SOI) starts the file, then a sequence of segments, each introduced by &lt;code&gt;FF&lt;/code&gt; plus a marker byte and, for most markers, a two-byte big-endian length that includes the length field itself.&lt;/p&gt;

&lt;p&gt;EXIF rides in an &lt;code&gt;APP1&lt;/code&gt; segment (&lt;code&gt;FF E1&lt;/code&gt;). Its payload begins with the six-byte signature &lt;code&gt;45 78 69 66 00 00&lt;/code&gt; ("Exif\0\0"), followed by a TIFF structure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a two-byte byte-order mark: &lt;code&gt;II&lt;/code&gt; (0x4949) little-endian or &lt;code&gt;MM&lt;/code&gt; (0x4D4D) big-endian&lt;/li&gt;
&lt;li&gt;a two-byte magic &lt;code&gt;0x002A&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;a four-byte offset to the first image file directory (IFD0)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An IFD is a two-byte entry count followed by 12-byte entries. Each entry is tag (2 bytes), type (2 bytes), count (4 bytes), and a four-byte value-or-offset field. Orientation is tag &lt;code&gt;0x0112&lt;/code&gt;, type 3 (&lt;code&gt;SHORT&lt;/code&gt;), count 1 — so the value lives in the first two bytes of the value field, and you have to read it with the endianness you detected from the &lt;code&gt;II&lt;/code&gt;/&lt;code&gt;MM&lt;/code&gt; mark.&lt;/p&gt;

&lt;p&gt;That is roughly fifteen lines of parsing. The hard part is not parsing, it is knowing that you must:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;scan for &lt;code&gt;APP1&lt;/code&gt; rather than assuming it is the first segment after SOI (it usually is, but &lt;code&gt;APP0&lt;/code&gt; JFIF and &lt;code&gt;APP2&lt;/code&gt; ICC profiles can precede it),&lt;/li&gt;
&lt;li&gt;stop scanning at the first &lt;code&gt;SOS&lt;/code&gt; marker (&lt;code&gt;FF DA&lt;/code&gt;), because after that you are in entropy-coded scan data where &lt;code&gt;FF&lt;/code&gt; bytes appear constantly and any marker-walking logic will start hallucinating,&lt;/li&gt;
&lt;li&gt;read the value with the correct endianness, because half the cameras in the world write big-endian and the rest write little-endian.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The eight defined values and their intended transforms:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1 = no transform (storage orientation)
2 = mirror horizontal
3 = rotate 180
4 = mirror vertical
5 = transpose (mirror horizontal + rotate 270 CW)
6 = rotate 90 CW
7 = transverse (mirror horizontal + rotate 90 CW)
8 = rotate 270 CW
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Values 5 through 8 involve a transpose, which is why naive implementations that only special-case 1, 3, 6 and 8 quietly mangle every mirrored selfie.&lt;/p&gt;

&lt;h2&gt;
  
  
  WebP and AVIF do it differently, which is the part that bites
&lt;/h2&gt;

&lt;p&gt;WebP is a RIFF container: &lt;code&gt;RIFF&lt;/code&gt;, a four-byte size, &lt;code&gt;WEBP&lt;/code&gt;, then chunks identified by four-character codes. If the file carries EXIF, it is in a chunk with the fourcc &lt;code&gt;EXIF&lt;/code&gt;, and — this is the detail that trips up JPEG-trained parsers — the chunk payload starts &lt;em&gt;directly&lt;/em&gt; with the TIFF header. There is no &lt;code&gt;Exif\0\0&lt;/code&gt; signature to skip. Read the chunk body, detect &lt;code&gt;II&lt;/code&gt;/&lt;code&gt;MM&lt;/code&gt;, walk IFD0, read tag &lt;code&gt;0x0112&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;AVIF is not a metadata container at all. It is ISOBMFF, a tree of boxes, and orientation is expressed as a &lt;em&gt;transformative property&lt;/em&gt; rather than a tag:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;irot&lt;/code&gt; (image rotation): a one-byte angle field where the lower two bits hold the angle in anticlockwise units of 90°.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;imir&lt;/code&gt; (image mirror): a one-byte axis field, &lt;code&gt;0&lt;/code&gt; meaning the vertical axis, &lt;code&gt;1&lt;/code&gt; meaning the horizontal axis.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both boxes live inside &lt;code&gt;meta&lt;/code&gt; → &lt;code&gt;iprp&lt;/code&gt; → &lt;code&gt;ipco&lt;/code&gt;, referenced from the item property association list. A file can carry an &lt;code&gt;irot&lt;/code&gt; and an &lt;code&gt;imir&lt;/code&gt; together, applied in order, and HEIF-derived encoders use &lt;code&gt;clap&lt;/code&gt; (clean aperture) on top of that. So an AVIF pipeline that reads EXIF only will report "no orientation" for a file that is genuinely rotated, because the rotation was never in EXIF.&lt;/p&gt;

&lt;p&gt;To make this worse, browsers apply AVIF &lt;code&gt;irot&lt;/code&gt;/&lt;code&gt;imir&lt;/code&gt; during decode with no CSS involvement at all. The displayed image is correct, the decoded pixels are correct, and your metadata-only reader is the only component in the chain that is wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the browser actually does
&lt;/h2&gt;

&lt;p&gt;Here is the behavior that makes pipelines inconsistent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;img src&amp;gt;&lt;/code&gt; applies orientation automatically. The CSS property &lt;code&gt;image-orientation&lt;/code&gt; defaults to &lt;code&gt;from-image&lt;/code&gt;, which means the browser reads the EXIF flag and rotates at paint time. Since Chrome 81 this has been the default across all major browsers.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;createImageBitmap(blob)&lt;/code&gt; also defaults to &lt;code&gt;imageOrientation: "from-image"&lt;/code&gt;. Passing &lt;code&gt;"none"&lt;/code&gt; gives you the raw, stored-orientation pixels — which is exactly what you want for a hash or a thumbnail you will rotate yourself, and exactly what you do not want if you forgot the option exists.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;canvas.drawImage(htmlImageElement, ...)&lt;/code&gt; draws &lt;em&gt;already-oriented&lt;/em&gt; pixels, because the element decoded them that way.&lt;/li&gt;
&lt;li&gt;PNG has no orientation semantics. The &lt;code&gt;eXIf&lt;/code&gt; chunk exists in the PNG extensions spec, but browsers do not apply it. Once you transcode a rotated JPEG to PNG, the rotation information is gone unless you baked it into the pixels.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last point is the trap. A pipeline that says "read EXIF, rotate the image afterwards" works for JPEG and silently produces upside-down PNGs, because by the time the file is PNG the evidence has been re-encoded away. The correct order is: decode in stored orientation (&lt;code&gt;imageOrientation: "none"&lt;/code&gt;), apply the transform to a canvas, then encode. Bake first, write second. Never write an EXIF flag you are not sure the next consumer honors.&lt;/p&gt;

&lt;p&gt;And never do both. A surprising number of exported files carry &lt;code&gt;Orientation = 6&lt;/code&gt; &lt;em&gt;and&lt;/em&gt; rotated pixels, because two stages of the pipeline each "fixed" it. The file looks right in a viewer that ignores EXIF and sideways in the one that honors it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cost of getting it right
&lt;/h2&gt;

&lt;p&gt;Three practical costs, each of which shapes the design:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Byte access.&lt;/strong&gt; EXIF for JPEG sits near the front of the file, usually within the first 64 KB, so a &lt;code&gt;Range: bytes=0-65535&lt;/code&gt; request is enough and you can skip the full download. But a &lt;code&gt;SOS&lt;/code&gt; can arrive later than 64 KB on images with large embedded thumbnails, and some CDNs answer &lt;code&gt;200&lt;/code&gt; and send the whole body anyway. So you stream, cap the buffer, and bail out with "orientation unknown" instead of downloading 8 MB to find one integer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Re-encoding.&lt;/strong&gt; Baking rotation means decoding to a bitmap, transforming, and re-encoding. For a 200-image export that is real CPU time and a real quality decision: re-encoding a JPEG at quality 92 costs you a generation of artifacts. Tools that care store the transform as an editing instruction and apply it once, at export.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Privacy.&lt;/strong&gt; The same EXIF block that carries orientation also carries GPS coordinates, camera make and model, body serial number, lens serial, &lt;code&gt;DateTimeOriginal&lt;/code&gt;, and often a thumbnail of whatever the photo looked like before it was cropped. A batch downloader that "keeps the metadata intact" is redistributing location data with every file. Stripping EXIF entirely is the safe default for anything leaving the machine; keeping it is a deliberate choice for archives that need provenance.&lt;/p&gt;

&lt;h2&gt;
  
  
  What OmniPic does with this
&lt;/h2&gt;

&lt;p&gt;This is the layer OmniPic AI Studio Pro is built around, and it is the reason the export path looks more complicated than a zip of URLs.&lt;/p&gt;

&lt;p&gt;When a full-site inspection finishes, every collected image has been through: header-based dimension and format detection, orientation resolution (EXIF tag &lt;code&gt;0x0112&lt;/code&gt; for JPEG and WebP, &lt;code&gt;irot&lt;/code&gt;/&lt;code&gt;imir&lt;/code&gt; for AVIF), and a decision record for whether the transform must be baked. On export, rotated images are decoded in stored orientation, transformed on a canvas, and re-encoded — so what lands in your reference library is upright in every viewer, not just in the one you happened to test.&lt;/p&gt;

&lt;p&gt;The parts that are already handled:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Full-site image inspection with classification&lt;/strong&gt; — one pass over the page collects image elements, CSS backgrounds, &lt;code&gt;srcset&lt;/code&gt; candidates and lazy-loaded sources, then groups them by source and type.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CDN original recovery&lt;/strong&gt; — Alibaba OSS, Tencent COS and Qiniu thumbnail URLs are reverse-mapped to the original asset.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-device AI reverse image search&lt;/strong&gt; — a MobileNet backbone produces a 1024-dimension feature vector, accelerated with WebGPU; nothing leaves the browser.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pHash visual deduplication&lt;/strong&gt; — perceptual hashing collapses near-identical variants into one entry before download.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Direct Eagle and Billfish integration&lt;/strong&gt; — collected assets land in the reference manager you already use, upright and with sensible metadata.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streaming ZIP export for 2,000+ images&lt;/strong&gt; — a streaming archive writer keeps memory flat, so a huge export does not freeze the browser.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;100% local processing&lt;/strong&gt; — decoding, rotating, hashing, embedding and packaging all run in your browser; no upload, no account.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The configuration surface for this — orientation baking, metadata policy, deduplication thresholds — looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Faka.doubaocdn.com%2Fs%2FzutgTXCYiS" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Faka.doubaocdn.com%2Fs%2FzutgTXCYiS" alt="OmniPic AI Studio Pro — pro engine settings for orientation, metadata and deduplication" width="800" height="1067"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the export view, where the baked-in orientation and metadata policy decide what the ZIP actually contains:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Faka.doubaocdn.com%2Fs%2FumztWAmceu" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Faka.doubaocdn.com%2Fs%2FumztWAmceu" alt="OmniPic AI Studio Pro — batch export with Eagle integration and streaming ZIP" width="800" height="1067"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OmniPic AI Studio Pro is available on all three major stores: Chrome, Edge, and Firefox. Install it here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chromewebstore.google.com/detail/omnipic-studio-pro/cokoeaaaglgcljahaffjeijomhmkljlc" rel="noopener noreferrer"&gt;https://chromewebstore.google.com/detail/omnipic-studio-pro/cokoeaaaglgcljahaffjeijomhmkljlc&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are building your own collector, take the small piece even if you never install anything: read tag &lt;code&gt;0x0112&lt;/code&gt; before you touch a pixel, decide whether the transform is baked or declared, and never do both. Orientation is fifteen lines of parsing and about four hours of debugging if you skip it.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>browser</category>
    </item>
    <item>
      <title>Your Downloaded Images Are Sideways: Parsing EXIF Orientation in JPEG, WebP and AVIF</title>
      <dc:creator>eden zhang</dc:creator>
      <pubDate>Tue, 24 Nov 2026 02:26:28 +0000</pubDate>
      <link>https://dev.to/eden_zhang/your-downloaded-images-are-sideways-parsing-exif-orientation-in-jpeg-webp-and-avif-56e2</link>
      <guid>https://dev.to/eden_zhang/your-downloaded-images-are-sideways-parsing-exif-orientation-in-jpeg-webp-and-avif-56e2</guid>
      <description>&lt;p&gt;Every image collector eventually ships a bug report that reads like this: "the images I downloaded are rotated 90 degrees." And every developer answers it once with "that's just how the camera saved it", and then spends three hours discovering that it is not that simple.&lt;/p&gt;

&lt;p&gt;The pixels on disk are not rotated. The file &lt;em&gt;declares&lt;/em&gt; a rotation. Two different consumers — your browser, your image viewer, your design tool — disagree about whether to apply that declaration, and the one that disagrees with your pipeline is the one your user opens first.&lt;/p&gt;

&lt;p&gt;This post is about where that declaration lives, byte by byte, in JPEG, WebP and AVIF, what browsers actually do with it, and why "just rotate it afterwards" is a trap that produces double-rotated images in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  The photo was never sideways
&lt;/h2&gt;

&lt;p&gt;A modern phone camera has a sensor that is physically landscape. When you hold the phone upright, the sensor still records a 4032 × 3024 landscape frame; the firmware then writes &lt;code&gt;Orientation = 6&lt;/code&gt; into the EXIF block, meaning "the viewer should rotate this 90° clockwise to display it correctly". The JPEG bitstream is untouched. Decode it with an orientation-unaware decoder and you get a correctly-exposed, correctly-colored, sideways photo.&lt;/p&gt;

&lt;p&gt;That single integer is the entire problem. It is also, in practice, the most common metadata field in the world of image tooling that gets dropped, duplicated, or applied twice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the flag lives: JPEG
&lt;/h2&gt;

&lt;p&gt;JPEG is a marker stream. &lt;code&gt;FF D8&lt;/code&gt; (SOI) starts the file, then a sequence of segments, each introduced by &lt;code&gt;FF&lt;/code&gt; plus a marker byte and, for most markers, a two-byte big-endian length that includes the length field itself.&lt;/p&gt;

&lt;p&gt;EXIF rides in an &lt;code&gt;APP1&lt;/code&gt; segment (&lt;code&gt;FF E1&lt;/code&gt;). Its payload begins with the six-byte signature &lt;code&gt;45 78 69 66 00 00&lt;/code&gt; ("Exif\0\0"), followed by a TIFF structure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a two-byte byte-order mark: &lt;code&gt;II&lt;/code&gt; (0x4949) little-endian or &lt;code&gt;MM&lt;/code&gt; (0x4D4D) big-endian&lt;/li&gt;
&lt;li&gt;a two-byte magic &lt;code&gt;0x002A&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;a four-byte offset to the first image file directory (IFD0)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An IFD is a two-byte entry count followed by 12-byte entries. Each entry is tag (2 bytes), type (2 bytes), count (4 bytes), and a four-byte value-or-offset field. Orientation is tag &lt;code&gt;0x0112&lt;/code&gt;, type 3 (&lt;code&gt;SHORT&lt;/code&gt;), count 1 — so the value lives in the first two bytes of the value field, and you have to read it with the endianness you detected from the &lt;code&gt;II&lt;/code&gt;/&lt;code&gt;MM&lt;/code&gt; mark.&lt;/p&gt;

&lt;p&gt;That is roughly fifteen lines of parsing. The hard part is not parsing, it is knowing that you must:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;scan for &lt;code&gt;APP1&lt;/code&gt; rather than assuming it is the first segment after SOI (it usually is, but &lt;code&gt;APP0&lt;/code&gt; JFIF and &lt;code&gt;APP2&lt;/code&gt; ICC profiles can precede it),&lt;/li&gt;
&lt;li&gt;stop scanning at the first &lt;code&gt;SOS&lt;/code&gt; marker (&lt;code&gt;FF DA&lt;/code&gt;), because after that you are in entropy-coded scan data where &lt;code&gt;FF&lt;/code&gt; bytes appear constantly and any marker-walking logic will start hallucinating,&lt;/li&gt;
&lt;li&gt;read the value with the correct endianness, because half the cameras in the world write big-endian and the rest write little-endian.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The eight defined values and their intended transforms:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1 = no transform (storage orientation)
2 = mirror horizontal
3 = rotate 180
4 = mirror vertical
5 = transpose (mirror horizontal + rotate 270 CW)
6 = rotate 90 CW
7 = transverse (mirror horizontal + rotate 90 CW)
8 = rotate 270 CW
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Values 5 through 8 involve a transpose, which is why naive implementations that only special-case 1, 3, 6 and 8 quietly mangle every mirrored selfie.&lt;/p&gt;

&lt;h2&gt;
  
  
  WebP and AVIF do it differently, which is the part that bites
&lt;/h2&gt;

&lt;p&gt;WebP is a RIFF container: &lt;code&gt;RIFF&lt;/code&gt;, a four-byte size, &lt;code&gt;WEBP&lt;/code&gt;, then chunks identified by four-character codes. If the file carries EXIF, it is in a chunk with the fourcc &lt;code&gt;EXIF&lt;/code&gt;, and — this is the detail that trips up JPEG-trained parsers — the chunk payload starts &lt;em&gt;directly&lt;/em&gt; with the TIFF header. There is no &lt;code&gt;Exif\0\0&lt;/code&gt; signature to skip. Read the chunk body, detect &lt;code&gt;II&lt;/code&gt;/&lt;code&gt;MM&lt;/code&gt;, walk IFD0, read tag &lt;code&gt;0x0112&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;AVIF is not a metadata container at all. It is ISOBMFF, a tree of boxes, and orientation is expressed as a &lt;em&gt;transformative property&lt;/em&gt; rather than a tag:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;irot&lt;/code&gt; (image rotation): a one-byte angle field where the lower two bits hold the angle in anticlockwise units of 90°.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;imir&lt;/code&gt; (image mirror): a one-byte axis field, &lt;code&gt;0&lt;/code&gt; meaning the vertical axis, &lt;code&gt;1&lt;/code&gt; meaning the horizontal axis.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both boxes live inside &lt;code&gt;meta&lt;/code&gt; → &lt;code&gt;iprp&lt;/code&gt; → &lt;code&gt;ipco&lt;/code&gt;, referenced from the item property association list. A file can carry an &lt;code&gt;irot&lt;/code&gt; and an &lt;code&gt;imir&lt;/code&gt; together, applied in order, and HEIF-derived encoders use &lt;code&gt;clap&lt;/code&gt; (clean aperture) on top of that. So an AVIF pipeline that reads EXIF only will report "no orientation" for a file that is genuinely rotated, because the rotation was never in EXIF.&lt;/p&gt;

&lt;p&gt;To make this worse, browsers apply AVIF &lt;code&gt;irot&lt;/code&gt;/&lt;code&gt;imir&lt;/code&gt; during decode with no CSS involvement at all. The displayed image is correct, the decoded pixels are correct, and your metadata-only reader is the only component in the chain that is wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the browser actually does
&lt;/h2&gt;

&lt;p&gt;Here is the behavior that makes pipelines inconsistent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;img src&amp;gt;&lt;/code&gt; applies orientation automatically. The CSS property &lt;code&gt;image-orientation&lt;/code&gt; defaults to &lt;code&gt;from-image&lt;/code&gt;, which means the browser reads the EXIF flag and rotates at paint time. Since Chrome 81 this has been the default across all major browsers.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;createImageBitmap(blob)&lt;/code&gt; also defaults to &lt;code&gt;imageOrientation: "from-image"&lt;/code&gt;. Passing &lt;code&gt;"none"&lt;/code&gt; gives you the raw, stored-orientation pixels — which is exactly what you want for a hash or a thumbnail you will rotate yourself, and exactly what you do not want if you forgot the option exists.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;canvas.drawImage(htmlImageElement, ...)&lt;/code&gt; draws &lt;em&gt;already-oriented&lt;/em&gt; pixels, because the element decoded them that way.&lt;/li&gt;
&lt;li&gt;PNG has no orientation semantics. The &lt;code&gt;eXIf&lt;/code&gt; chunk exists in the PNG extensions spec, but browsers do not apply it. Once you transcode a rotated JPEG to PNG, the rotation information is gone unless you baked it into the pixels.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last point is the trap. A pipeline that says "read EXIF, rotate the image afterwards" works for JPEG and silently produces upside-down PNGs, because by the time the file is PNG the evidence has been re-encoded away. The correct order is: decode in stored orientation (&lt;code&gt;imageOrientation: "none"&lt;/code&gt;), apply the transform to a canvas, then encode. Bake first, write second. Never write an EXIF flag you are not sure the next consumer honors.&lt;/p&gt;

&lt;p&gt;And never do both. A surprising number of exported files carry &lt;code&gt;Orientation = 6&lt;/code&gt; &lt;em&gt;and&lt;/em&gt; rotated pixels, because two stages of the pipeline each "fixed" it. The file looks right in a viewer that ignores EXIF and sideways in the one that honors it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cost of getting it right
&lt;/h2&gt;

&lt;p&gt;Three practical costs, each of which shapes the design:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Byte access.&lt;/strong&gt; EXIF for JPEG sits near the front of the file, usually within the first 64 KB, so a &lt;code&gt;Range: bytes=0-65535&lt;/code&gt; request is enough and you can skip the full download. But a &lt;code&gt;SOS&lt;/code&gt; can arrive later than 64 KB on images with large embedded thumbnails, and some CDNs answer &lt;code&gt;200&lt;/code&gt; and send the whole body anyway. So you stream, cap the buffer, and bail out with "orientation unknown" instead of downloading 8 MB to find one integer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Re-encoding.&lt;/strong&gt; Baking rotation means decoding to a bitmap, transforming, and re-encoding. For a 200-image export that is real CPU time and a real quality decision: re-encoding a JPEG at quality 92 costs you a generation of artifacts. Tools that care store the transform as an editing instruction and apply it once, at export.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Privacy.&lt;/strong&gt; The same EXIF block that carries orientation also carries GPS coordinates, camera make and model, body serial number, lens serial, &lt;code&gt;DateTimeOriginal&lt;/code&gt;, and often a thumbnail of whatever the photo looked like before it was cropped. A batch downloader that "keeps the metadata intact" is redistributing location data with every file. Stripping EXIF entirely is the safe default for anything leaving the machine; keeping it is a deliberate choice for archives that need provenance.&lt;/p&gt;

&lt;h2&gt;
  
  
  What OmniPic does with this
&lt;/h2&gt;

&lt;p&gt;This is the layer OmniPic AI Studio Pro is built around, and it is the reason the export path looks more complicated than a zip of URLs.&lt;/p&gt;

&lt;p&gt;When a full-site inspection finishes, every collected image has been through: header-based dimension and format detection, orientation resolution (EXIF tag &lt;code&gt;0x0112&lt;/code&gt; for JPEG and WebP, &lt;code&gt;irot&lt;/code&gt;/&lt;code&gt;imir&lt;/code&gt; for AVIF), and a decision record for whether the transform must be baked. On export, rotated images are decoded in stored orientation, transformed on a canvas, and re-encoded — so what lands in your reference library is upright in every viewer, not just in the one you happened to test.&lt;/p&gt;

&lt;p&gt;The parts that are already handled:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Full-site image inspection with classification&lt;/strong&gt; — one pass over the page collects image elements, CSS backgrounds, &lt;code&gt;srcset&lt;/code&gt; candidates and lazy-loaded sources, then groups them by source and type.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CDN original recovery&lt;/strong&gt; — Alibaba OSS, Tencent COS and Qiniu thumbnail URLs are reverse-mapped to the original asset.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-device AI reverse image search&lt;/strong&gt; — a MobileNet backbone produces a 1024-dimension feature vector, accelerated with WebGPU; nothing leaves the browser.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pHash visual deduplication&lt;/strong&gt; — perceptual hashing collapses near-identical variants into one entry before download.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Direct Eagle and Billfish integration&lt;/strong&gt; — collected assets land in the reference manager you already use, upright and with sensible metadata.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streaming ZIP export for 2,000+ images&lt;/strong&gt; — a streaming archive writer keeps memory flat, so a huge export does not freeze the browser.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;100% local processing&lt;/strong&gt; — decoding, rotating, hashing, embedding and packaging all run in your browser; no upload, no account.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The configuration surface for this — orientation baking, metadata policy, deduplication thresholds — looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Faka.doubaocdn.com%2Fs%2FzutgTXCYiS" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Faka.doubaocdn.com%2Fs%2FzutgTXCYiS" alt="OmniPic AI Studio Pro — pro engine settings for orientation, metadata and deduplication" width="800" height="1067"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the export view, where the baked-in orientation and metadata policy decide what the ZIP actually contains:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Faka.doubaocdn.com%2Fs%2FumztWAmceu" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Faka.doubaocdn.com%2Fs%2FumztWAmceu" alt="OmniPic AI Studio Pro — batch export with Eagle integration and streaming ZIP" width="800" height="1067"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OmniPic AI Studio Pro is available on all three major stores: Chrome, Edge, and Firefox. Install it here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chromewebstore.google.com/detail/omnipic-studio-pro/cokoeaaaglgcljahaffjeijomhmkljlc" rel="noopener noreferrer"&gt;https://chromewebstore.google.com/detail/omnipic-studio-pro/cokoeaaaglgcljahaffjeijomhmkljlc&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are building your own collector, take the small piece even if you never install anything: read tag &lt;code&gt;0x0112&lt;/code&gt; before you touch a pixel, decide whether the transform is baked or declared, and never do both. Orientation is fifteen lines of parsing and about four hours of debugging if you skip it.&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>programming</category>
      <category>softwareengineering</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Reading Image Dimensions Without Decoding: Parsing JPEG, PNG, WebP and AVIF Headers in the Browser</title>
      <dc:creator>eden zhang</dc:creator>
      <pubDate>Mon, 23 Nov 2026 02:25:11 +0000</pubDate>
      <link>https://dev.to/eden_zhang/reading-image-dimensions-without-decoding-parsing-jpeg-png-webp-and-avif-headers-in-the-browser-1480</link>
      <guid>https://dev.to/eden_zhang/reading-image-dimensions-without-decoding-parsing-jpeg-png-webp-and-avif-headers-in-the-browser-1480</guid>
      <description>&lt;p&gt;Every image collection tool eventually hits the same wall: you have 300 image URLs from a page, and the user wants only the ones that are actually useful — "give me everything wider than 1200px", "skip the icons", "only the hero shots". The naive implementation is to create an &lt;code&gt;Image&lt;/code&gt; object, wait for &lt;code&gt;onload&lt;/code&gt;, and read &lt;code&gt;naturalWidth&lt;/code&gt;. It works. It is also the single most expensive thing your extension can do to a browsing session.&lt;/p&gt;

&lt;p&gt;This post is about the alternative: reading the dimensions and the true format straight out of the file header bytes, usually within the first 30 to 2,000 bytes of the response, without ever allocating a decoded bitmap.&lt;/p&gt;

&lt;h2&gt;
  
  
  What decoding actually costs
&lt;/h2&gt;

&lt;p&gt;When you set &lt;code&gt;img.src&lt;/code&gt; and wait for &lt;code&gt;onload&lt;/code&gt;, the browser does a full pipeline: network, container demux, entropy decode, inverse DCT or prediction reconstruction, color conversion, and finally a bitmap in memory. For a 2048 × 2048 photo that bitmap is 2048 × 2048 × 4 bytes ≈ 16.8 MB. Ten of those in flight is a third of a gigabyte. Chrome will not politely refuse; it will start evicting decoded image caches, and every subsequent scroll on the page re-decodes thumbnails the user is looking at. The extension "just reads dimensions" and the site gets slower.&lt;/p&gt;

&lt;p&gt;The decode also costs time. On a mid-range laptop a 4K JPEG takes roughly 30–80 ms to decode, and the work lands on the main thread or on an &lt;code&gt;ImageBitmap&lt;/code&gt; worker you now have to manage. Multiply by 300 and you have added 10–25 seconds of CPU to a task whose answer was a pair of integers.&lt;/p&gt;

&lt;p&gt;And there is a third cost nobody thinks about until it bites: decoding requires the bytes. To decode, you must download the whole file. On a page with CDN-optimized originals, that is tens of megabytes spent to learn two numbers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The header is enough
&lt;/h2&gt;

&lt;p&gt;All mainstream image containers declare their dimensions in a small, fixed-location or quickly-scannable structure near the start of the file. You do not need a decoder; you need a byte reader and four small parsers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JPEG.&lt;/strong&gt; The file starts with &lt;code&gt;FF D8&lt;/code&gt; (SOI). After that, JPEG is a sequence of segments, each &lt;code&gt;FF&lt;/code&gt; followed by a marker byte. Some markers (RST0–RST7, TEM) are standalone; the rest are followed by a two-byte big-endian length that includes the length field itself. The dimensions live in a Start-Of-Frame segment: &lt;code&gt;FFC0&lt;/code&gt; (baseline), &lt;code&gt;FFC1&lt;/code&gt;, &lt;code&gt;FFC2&lt;/code&gt; (progressive), and the arithmetic-coding variants &lt;code&gt;C3&lt;/code&gt;, &lt;code&gt;C5&lt;/code&gt;–&lt;code&gt;C7&lt;/code&gt;, &lt;code&gt;C9&lt;/code&gt;–&lt;code&gt;CB&lt;/code&gt;, &lt;code&gt;CD&lt;/code&gt;–&lt;code&gt;CF&lt;/code&gt;. Inside a SOF segment, after the two-byte length, you have a one-byte sample precision, then two bytes height, then two bytes width, both big-endian. So the practical loop is: skip to &lt;code&gt;FFD8&lt;/code&gt;, walk markers, skip &lt;code&gt;length - 2&lt;/code&gt; bytes for non-SOF segments, and stop at the first SOF. In a typical camera JPEG the SOF arrives within the first few hundred bytes, right after the APPn and DQT segments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PNG.&lt;/strong&gt; Far simpler. Eight-byte signature &lt;code&gt;89 50 4E 47 0D 0A 1A 0A&lt;/code&gt;, then the first chunk must be &lt;code&gt;IHDR&lt;/code&gt;. Read four bytes length, four bytes type, and the payload begins at offset 16: width as a four-byte big-endian integer, height as the next four bytes. Done at byte 24. Note that &lt;code&gt;IHDR&lt;/code&gt; is required to be first, which is why this shortcut is safe — unlike the "PNG has its size at a fixed offset" folklore that breaks on malformed files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GIF.&lt;/strong&gt; Six-byte header &lt;code&gt;GIF87a&lt;/code&gt; or &lt;code&gt;GIF89a&lt;/code&gt;, then the Logical Screen Descriptor at offset 6: width as two bytes little-endian, height as the next two bytes. Again, byte 10 and you are finished.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WebP.&lt;/strong&gt; This is where people get it wrong, because WebP has three variants and each stores size differently. The container is &lt;code&gt;RIFF&lt;/code&gt; + four-byte size + &lt;code&gt;WEBP&lt;/code&gt;, then a chunk identified by a four-character code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;VP8&lt;/code&gt; (lossy): three bytes of frame tag, a three-byte start code &lt;code&gt;9D 01 2A&lt;/code&gt;, then two bytes holding a 14-bit width followed by a 2-bit horizontal scale, then two bytes for a 14-bit height. Mask off the low two bits of each.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;VP8L&lt;/code&gt; (lossless): a one-byte signature &lt;code&gt;0x2F&lt;/code&gt;, then four bytes bit-packed as 14 bits of &lt;code&gt;width - 1&lt;/code&gt; and 14 bits of &lt;code&gt;height - 1&lt;/code&gt;. Both are stored minus one, so you must add one back.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;VP8X&lt;/code&gt; (extended, used for alpha and animation): a flags byte, three reserved bytes, then three bytes of &lt;code&gt;canvas width - 1&lt;/code&gt; and three bytes of &lt;code&gt;canvas height - 1&lt;/code&gt;, little-endian 24-bit values.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you only handle &lt;code&gt;VP8&lt;/code&gt; you will silently return zeros for every lossless or alpha WebP your users download — which, in 2026, is most of them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AVIF.&lt;/strong&gt; AVIF is ISOBMFF, so it is a box tree, not a flat header. You start with &lt;code&gt;ftyp&lt;/code&gt; and check the brand for &lt;code&gt;avif&lt;/code&gt; or &lt;code&gt;avis&lt;/code&gt;, then descend into &lt;code&gt;meta&lt;/code&gt;, &lt;code&gt;iprp&lt;/code&gt;, &lt;code&gt;ipco&lt;/code&gt; to find the &lt;code&gt;ispe&lt;/code&gt; box. Each box is a four-byte size followed by a four-byte type; &lt;code&gt;ispe&lt;/code&gt; carries a version-and-flags word and then a four-byte big-endian width and height. A pragmatic reader skips boxes by their declared size rather than guessing, and gives up after a bounded number of bytes rather than walking the whole file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fetching only the bytes you need
&lt;/h2&gt;

&lt;p&gt;With a parser in hand, the request strategy becomes the interesting part. The right primitive is a ranged request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Range: bytes=0-2047
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A well-behaved CDN answers &lt;code&gt;206 Partial Content&lt;/code&gt; and you have your dimensions in about 30 ms without touching the original. The complication is that a large fraction of real-world CDNs ignore &lt;code&gt;Range&lt;/code&gt; on images, or honor it only for cache hits, and answer &lt;code&gt;200&lt;/code&gt; with the entire body — 4 MB of pixels for two integers.&lt;/p&gt;

&lt;p&gt;The defence is to stream the response and stop early rather than buffering it. In an extension you get a &lt;code&gt;ReadableStream&lt;/code&gt; from the fetch response, you read chunks into a growing &lt;code&gt;Uint8Array&lt;/code&gt; with a hard cap (say 8 KB), and as soon as a parser reports success you call &lt;code&gt;reader.cancel()&lt;/code&gt; — which propagates to the network layer and aborts the transfer instead of wasting the transfer. If the cap is reached without a parse, mark the image as "unknown dimensions" and move on rather than escalating to a full download. On a page with 300 images where 60% answer &lt;code&gt;206&lt;/code&gt;, this turns tens of megabytes into a few hundred kilobytes.&lt;/p&gt;

&lt;p&gt;Two more details matter. First, &lt;code&gt;Accept&lt;/code&gt; negotiation: the same URL can return &lt;code&gt;image/avif&lt;/code&gt; to one request and &lt;code&gt;image/webp&lt;/code&gt; to another, because the server picks based on your headers. You must sniff the magic bytes of the actual response and dispatch to the corresponding parser; never trust the file extension, and never trust the &lt;code&gt;Content-Type&lt;/code&gt; alone. Second, signature-scoped URLs: presigned OSS, COS, Qiniu, S3 and CloudFront URLs carry an HMAC over the exact path and query string. Adding &lt;code&gt;Range&lt;/code&gt; as a header is fine, but rewriting the URL at all — stripping a resize parameter, normalizing the query — invalidates the signature and you get a 403 instead of a header.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is harder than it looks in an extension
&lt;/h2&gt;

&lt;p&gt;Putting the pieces together in a Manifest V3 extension adds its own friction. The network fetch has to happen somewhere with the right origin attribution, &lt;code&gt;Range&lt;/code&gt; headers on some hosts trigger CORS preflights that the host does not answer, and the parsers have to be robust against truncated responses, mismatched formats, and the occasional HTML error page served with &lt;code&gt;Content-Type: image/jpeg&lt;/code&gt;. You also have to decide caching semantics: the header is cheap, but a per-URL &lt;code&gt;Uint8Array&lt;/code&gt; of 2 KB × 300 images is its own memory leak if you never release it, so store the parsed integers and drop the bytes.&lt;/p&gt;

&lt;p&gt;None of this is exotic engineering. It is four small parsers, one streaming fetch loop, a bounded buffer, and a sane fallback. But it is the difference between a tool that filters images intelligently and one that pins a fan for ten seconds every time you open a page.&lt;/p&gt;

&lt;h2&gt;
  
  
  What OmniPic does with this
&lt;/h2&gt;

&lt;p&gt;This is exactly the layer OmniPic AI Studio Pro sits on. When you run its full-site inspection, it does not decode every image to find out what it is. It reads headers, sniffs real formats, filters by dimensions and aspect ratio before any heavy work happens, then fetches only the originals that survive the filter — and it does that across the whole page while leaving the tab responsive.&lt;/p&gt;

&lt;p&gt;Concretely, the parts that are already handled for you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Full-site image inspection with classification&lt;/strong&gt; — one pass over the page collects every image element, CSS background, &lt;code&gt;srcset&lt;/code&gt; candidate and lazy-loaded source, then groups them by source and type instead of dumping 300 unsorted URLs on you.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CDN original recovery&lt;/strong&gt; — thumbnail URLs from Alibaba OSS, Tencent COS and Qiniu are reverse-mapped back to the original asset, so you get the real file, not the 200px preview.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-device AI reverse image search&lt;/strong&gt; — a MobileNet backbone produces a 1024-dimension feature vector, accelerated with WebGPU, so "find me more images that look like this one" runs locally.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pHash visual deduplication&lt;/strong&gt; — perceptual hashing collapses near-identical variants (same photo, different crop or compression) into one entry before you download them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Direct Eagle and Billfish integration&lt;/strong&gt; — collected assets land in the reference manager you already use, with the metadata intact.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streaming ZIP export for 2,000+ images&lt;/strong&gt; — a streaming archive writer keeps memory flat, so a huge export does not freeze the browser.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;100% local processing&lt;/strong&gt; — hashing, embedding and packaging all run in your browser; no upload, no server round trip, no account.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A detail worth calling out, since it is the theme of this article: dimensions, format and dedup decisions are all made &lt;em&gt;before&lt;/em&gt; the expensive step. The tool looks at kilobytes to decide whether to spend megabytes.&lt;/p&gt;

&lt;p&gt;Here is the inspection and filtering view, where the collected set is assembled and triaged:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Faka.doubaocdn.com%2Fs%2Fd9j2Yv5UYB" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Faka.doubaocdn.com%2Fs%2Fd9j2Yv5UYB" alt="OmniPic AI Studio Pro — full-site image inspection and filtering" width="800" height="1067"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OmniPic AI Studio Pro is available on all three major stores: Chrome, Edge, and Firefox. Install it here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chromewebstore.google.com/detail/omnipic-studio-pro/cokoeaaaglgcljahaffjeijomhmkljlc" rel="noopener noreferrer"&gt;https://chromewebstore.google.com/detail/omnipic-studio-pro/cokoeaaaglgcljahaffjeijomhmkljlc&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you build an image tool yourself, steal the header-parsing trick even if you never install anything — reading 24 bytes instead of decoding 16 MB is the cheapest optimization in this entire problem space.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>webscraping</category>
      <category>performance</category>
    </item>
    <item>
      <title>Why Your Image Scraper Gets 403 on Images That Load Fine in the Browser</title>
      <dc:creator>eden zhang</dc:creator>
      <pubDate>Sun, 22 Nov 2026 02:25:59 +0000</pubDate>
      <link>https://dev.to/eden_zhang/why-your-image-scraper-gets-403-on-images-that-load-fine-in-the-browser-3fbm</link>
      <guid>https://dev.to/eden_zhang/why-your-image-scraper-gets-403-on-images-that-load-fine-in-the-browser-3fbm</guid>
      <description>&lt;p&gt;Here is a failure mode that wastes more engineering hours than it should. You open a product page, watch the gallery thumbnails render perfectly, then run your download loop and get a folder full of &lt;code&gt;403 Forbidden&lt;/code&gt; responses, or worse, a set of 32×32 grey placeholders. Nothing is broken. The server is answering honestly. Your request simply is not the request the browser made.&lt;/p&gt;

&lt;p&gt;Two mechanisms cause most of it: the &lt;code&gt;Referer&lt;/code&gt; header, and signed CDN URLs. Both are easy to bypass by accident when testing manually, and both are brutal when you scale to a few thousand images.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mechanism one: the server wants to know where you came from
&lt;/h2&gt;

&lt;p&gt;Hotlink protection is the oldest anti-leech trick on the web, and it is still everywhere. The rule is usually something like: serve the image only if &lt;code&gt;Referer&lt;/code&gt; starts with one of the site's own hosts. No header, wrong host, or an empty value — respond &lt;code&gt;403&lt;/code&gt;, or respond &lt;code&gt;200&lt;/code&gt; with a placeholder.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;Referer&lt;/code&gt; header is not something a client can invent. Browsers derive it from the document that initiated the request and then apply a &lt;code&gt;Referrer-Policy&lt;/code&gt; to decide how much of it survives:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Policy&lt;/th&gt;
&lt;th&gt;Sent across origins&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;no-referrer&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;nothing at all&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;origin&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;origin only, e.g. &lt;code&gt;https://shop.example/&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;strict-origin-when-cross-origin&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;origin only, and nothing on HTTPS→HTTP downgrade&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;unsafe-url&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;the full path including query string&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Modern browsers default to &lt;code&gt;strict-origin-when-cross-origin&lt;/code&gt;, which means a cross-origin image request normally carries only the origin, not the path. Sites with stricter settings send nothing, and a &lt;code&gt;no-referrer&lt;/code&gt; page will produce image requests with an empty &lt;code&gt;Referer&lt;/code&gt; — which is exactly the request that hotlink rules reject.&lt;/p&gt;

&lt;p&gt;This has a direct consequence for anyone calling &lt;code&gt;fetch&lt;/code&gt; from a browser extension. In &lt;code&gt;fetch&lt;/code&gt;, the &lt;code&gt;referrer&lt;/code&gt; option can only &lt;strong&gt;shorten&lt;/strong&gt; what the browser would send; it cannot lengthen it, and it cannot be set to an arbitrary foreign origin. There is no supported way to fabricate someone else's referrer. So if your downloader runs in the extension's service worker, the request carries &lt;code&gt;chrome-extension://&amp;lt;id&amp;gt;&lt;/code&gt; as its origin, the server sees a stranger, and you get a wall of 403s.&lt;/p&gt;

&lt;p&gt;The fix is architectural, not a header hack: run the request &lt;strong&gt;in the page's own context&lt;/strong&gt;. A content script executes inside the page's origin, so a &lt;code&gt;fetch&lt;/code&gt; it issues carries the page's referrer and the page's cookies, which is precisely the request that already worked when the thumbnail rendered. Moving the download path from the background worker into a content script resolves a surprising share of "this image refuses to download" reports. Where the request must stay in the worker — because of CORS, credentials, or size — mirror the page's policy deliberately: read &lt;code&gt;document.referrer&lt;/code&gt;, read the document's &lt;code&gt;referrer-policy&lt;/code&gt; meta or header, and send the narrowest value that still satisfies the host's whitelist rather than guessing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mechanism two: the URL was a temporary ticket
&lt;/h2&gt;

&lt;p&gt;The second mechanism looks like nothing at all, because the URL in the DOM is usually valid at the moment you read it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://cdn.example.com/photos/hero.jpg?OSSAccessKeyId=LTAI...&amp;amp;Expires=1767225600&amp;amp;Signature=abc123%3D
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is an Alibaba Cloud OSS presigned URL: an access key id, an expiry timestamp, and an HMAC signature calculated over the object path plus the expiry. Tencent COS and Qiniu use the same pattern with different parameter names — Qiniu uses &lt;code&gt;e=&lt;/code&gt; and &lt;code&gt;token=&lt;/code&gt;, CloudFront uses &lt;code&gt;Policy=&lt;/code&gt;, &lt;code&gt;Signature=&lt;/code&gt; and &lt;code&gt;Key-Pair-Id=&lt;/code&gt;. AWS S3 presigned URLs put the signature in &lt;code&gt;X-Amz-Signature&lt;/code&gt; with &lt;code&gt;X-Amz-Expires&lt;/code&gt; controlling the window.&lt;/p&gt;

&lt;p&gt;Once the expiry passes, the signature is dead and the object returns &lt;code&gt;403 AccessDenied&lt;/code&gt; regardless of who you are. And here is the trap: the signature is computed over the &lt;strong&gt;exact path and query&lt;/strong&gt;, so any "helpful" normalisation on your side invalidates it. Strip the query string to get a "clean" URL and you have deleted the ticket. Rewrite the path to a sibling directory and the HMAC no longer matches. Append a transform parameter for a different size and the server hashes something else. The signature is not a decoration you can tidy up — it is the whole authentication.&lt;/p&gt;

&lt;p&gt;So the correct handling of a presigned URL is embarrassingly simple and easy to get wrong: &lt;strong&gt;use the string you found, byte for byte&lt;/strong&gt;, and treat it as a short-lived value rather than a durable identifier. Cache the bytes, not the URL. If you must store a reference, store it alongside its expiry so a later re-download can fail fast instead of wasting a request on a dead ticket.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this means for a crawler
&lt;/h2&gt;

&lt;p&gt;Put the two mechanisms together and the practical rules fall out:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Take URLs from the DOM, never construct them.&lt;/strong&gt; Read &lt;code&gt;img.currentSrc&lt;/code&gt;, &lt;code&gt;srcset&lt;/code&gt; candidates, &lt;code&gt;data-src&lt;/code&gt; attributes, and the resolved URL of CSS backgrounds. Reconstruction is where signatures die and where lazy-load placeholders get mistaken for originals.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tag every URL with the context that produced it.&lt;/strong&gt; Page URL, page-level referrer policy, whether the URL was presigned, whether the request needs cookies. A URL without its context is half a request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Issue the request from the right realm.&lt;/strong&gt; Page context for referrer- and cookie-dependent resources; worker context only when you have established the host does not care.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Classify the failure properly.&lt;/strong&gt; &lt;code&gt;403&lt;/code&gt; with an XML error body is usually a dead signature; &lt;code&gt;403&lt;/code&gt; with an HTML body is usually hotlink; &lt;code&gt;200&lt;/code&gt; with a 1×1 GIF is a tracking pixel or an anti-leech placeholder. Three different bugs that all look like "download failed" in a log.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fail in a bounded way.&lt;/strong&gt; A dead signature cannot be re-signed by you. Retry once with the page's original referrer, then mark the asset as unrecoverable instead of burning the queue on it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of this is conceptually hard. All of it is detail work that has to survive contact with thirty different CDNs, three image-serving proxies, and a page that renders its gallery through a &lt;code&gt;&amp;lt;picture&amp;gt;&lt;/code&gt; element with six &lt;code&gt;srcset&lt;/code&gt; candidates.&lt;/p&gt;

&lt;p&gt;That is the part OmniPic AI Studio Pro handles for you.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Faka.doubaocdn.com%2Fs%2F9Vn6LhkJp8" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Faka.doubaocdn.com%2Fs%2F9Vn6LhkJp8" alt="OmniPic AI Studio Pro configuration and engine settings" width="800" height="1067"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How OmniPic deals with it
&lt;/h2&gt;

&lt;p&gt;OmniPic AI Studio Pro is a Chrome extension for site-wide image inspection and collection, built around the assumption that the URL you see in the DOM is the only trustworthy one:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Site-wide crawl with DOM-accurate discovery&lt;/strong&gt; — it reads images from &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;picture&amp;gt;&lt;/code&gt;, &lt;code&gt;srcset&lt;/code&gt;/&lt;code&gt;currentSrc&lt;/code&gt;, CSS backgrounds, inline &lt;code&gt;data-*&lt;/code&gt; attributes and lazy-load payloads, taking the exact string the page used rather than a rebuilt guess.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CDN original recovery&lt;/strong&gt; — it recognises the transform conventions used by Alibaba Cloud OSS, Tencent COS and Qiniu, and walks a thumbnail back to the full-resolution object while keeping any signature attached to the URL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-device AI reverse image search&lt;/strong&gt; — MobileNet embeddings (1024 dimensions) accelerated with WebGPU, so "find more like this one" runs in your browser.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pHash deduplication&lt;/strong&gt; — 64-bit perceptual hashes and Hamming-distance matching collapse repeated assets across pages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Batch export&lt;/strong&gt; — thousands of images packed through a streaming ZIP, or written straight into Eagle or Billfish.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;100% local processing&lt;/strong&gt; — decoding, hashing, scoring and packing happen on your machine. No uploads, no server-side copy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It runs on Chrome, Edge and Firefox.&lt;/p&gt;

&lt;p&gt;If your current workflow involves a Python script, a &lt;code&gt;for&lt;/code&gt; loop and a folder of &lt;code&gt;403&lt;/code&gt; files, the interesting question is not how to get around the block — it is whether you were requesting the right URL from the right context in the first place.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://chromewebstore.google.com/detail/omnipic-studio-pro/cokoeaaaglgcljahaffjeijomhmkljlc" rel="noopener noreferrer"&gt;Install OmniPic AI Studio Pro from the Chrome Web Store&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>webscraping</category>
      <category>privacy</category>
    </item>
    <item>
      <title>How Local Image Libraries Really Work: File Layout, Metadata Sidecars, and the Export Pipeline</title>
      <dc:creator>eden zhang</dc:creator>
      <pubDate>Sun, 18 Oct 2026 02:16:45 +0000</pubDate>
      <link>https://dev.to/eden_zhang/how-local-image-libraries-really-work-file-layout-metadata-sidecars-and-the-export-pipeline-4hno</link>
      <guid>https://dev.to/eden_zhang/how-local-image-libraries-really-work-file-layout-metadata-sidecars-and-the-export-pipeline-4hno</guid>
      <description>&lt;p&gt;If you collect images professionally — for design, ecommerce, or content — browser bookmarks stop working after a few hundred items. Tabs get closed, CDN links rot, thumbnails expire, and a "saved" image is often just a URL you no longer trust. That's why serious collectors graduate to local asset management tools like Eagle or Billfish. This post looks at what actually happens inside those tools, and why getting images into them from a browser is a harder engineering problem than it sounds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 1: Inside a local asset library
&lt;/h2&gt;

&lt;p&gt;A digital asset manager (DAM) for images is, at its core, a file system plus a metadata index. Take Eagle's layout as a concrete example: the library is a folder (typically &lt;code&gt;eagle.library&lt;/code&gt;), and inside it the organization is deliberately simple.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Blob store.&lt;/strong&gt; Every imported image is copied into a &lt;code&gt;files/&lt;/code&gt; directory, renamed to a generated ID (something like &lt;code&gt;20231018-abcdef123456.png&lt;/code&gt;). The tool owns the filename; the human's original filename is stored as metadata, not on disk.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Metadata sidecars.&lt;/strong&gt; Alongside each blob, a small JSON document records the useful facts — original filename, source URL, tags, annotations, star rating, timestamp. Storing metadata beside the file, rather than only inside a database, makes the library portable and resilient: copy the folder and everything travels with it, and a corrupt database doesn't destroy the assets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thumbnails and previews.&lt;/strong&gt; Separate thumbnail files are generated at import so the UI can render grid views without decoding full-resolution JPEGs hundreds of times.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Search index.&lt;/strong&gt; A local database aggregates the sidecar metadata for fast tag/filename queries.&lt;/p&gt;

&lt;p&gt;Why this design? A single giant database is a single point of failure and hostile to syncing. File-plus-sidecar means every asset is self-describing, diffable, and recoverable even if the index is lost. The same pattern appears in Billfish and in photo managers like DigiKam — the file is the source of truth, metadata rides along.&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 2: The export pipeline problem
&lt;/h2&gt;

&lt;p&gt;The hard part isn't the library format — it's getting images from a web page into that format correctly. A naive pipeline (grab every &lt;code&gt;&amp;lt;img src&amp;gt;&lt;/code&gt;, download, dump into a folder) fails in four predictable ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Lazy loading.&lt;/strong&gt; Modern pages hide real URLs in &lt;code&gt;data-src&lt;/code&gt;, &lt;code&gt;data-original&lt;/code&gt;, or &lt;code&gt;srcset&lt;/code&gt; and only load them on scroll. A crawler that reads only &lt;code&gt;src&lt;/code&gt; gets placeholders and tracking pixels.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CDN thumbnails.&lt;/strong&gt; Image CDNs (Aliyun OSS, Tencent COS, Qiniu) serve resized thumbnails with processing parameters in the URL — &lt;code&gt;?x-oss-process=image/resize,w_200&lt;/code&gt;, &lt;code&gt;imageMogr2/thumbnail/200x200&lt;/code&gt;, &lt;code&gt;imageView2/2/w/200&lt;/code&gt;. Saving the thumbnail defeats the purpose; the original is often one parameter-strip away, but writing that recovery logic for three different CDN syntaxes is fiddly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Duplicates.&lt;/strong&gt; The same hero image appears on 40 article pages. Without detection you import 40 copies, waste disk space, and pollute the library's search-by-color/tag.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collisions and filenames.&lt;/strong&gt; Two sites can both ship &lt;code&gt;logo.png&lt;/code&gt;, and Windows-incompatible characters (&lt;code&gt;,&lt;/code&gt; &lt;code&gt;:&lt;/code&gt; &lt;code&gt;"&lt;/code&gt; &lt;code&gt;*&lt;/code&gt; &lt;code&gt;?&lt;/code&gt;) silently break exports.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So the correct pipeline has stages: discover (walk the DOM, union all URL sources, normalize), fetch (download with dedup by content hash or pHash), transform (recover originals from CDN parameters), and commit (write blob + sidecar JSON, generate thumbnails, update the index). Each stage is its own project — which is why most people never build it and settle for right-click-save, one image at a time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 3: Scale is where it breaks
&lt;/h2&gt;

&lt;p&gt;Add scale and a fifth failure appears: memory. Collecting a serious reference board might mean 2,000+ images. A tool that buffers every file in RAM and then zips them will freeze the page or crash the tab. The fix is streaming: pipe each response body through a transform stream straight into the archive writer, never materializing the whole byte array, and let backpressure pause downloads when the pipeline is saturated. With a streaming ZIP, 2,000 images export without the UI ever blocking — but implementing streaming ZIP writers, CDN recovery, and pHash dedup correctly takes weeks of edge-case handling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 4: What a finished pipeline looks like
&lt;/h2&gt;

&lt;p&gt;All of the above — discover, dedup, recover originals, stream, and write into the library — is exactly the plumbing that OmniPic AI Studio Pro bundles into a single browser extension. One click inspects the entire site: images are crawled from lazy-load attributes and srcset, classified by type, deduplicated with pHash, and CDN thumbnails are resolved back to their originals where the CDN rules allow it. The results export directly to Eagle or Billfish with proper metadata sidecars, or as a streaming ZIP of 2,000+ images without locking up the tab. Everything runs 100% locally — nothing is uploaded, which matters when you're collecting mood boards from a client's private site.&lt;/p&gt;

&lt;p&gt;Available on Chrome, Edge, and Firefox:&lt;/p&gt;

&lt;p&gt;Get OmniPic AI Studio Pro: &lt;a href="https://chromewebstore.google.com/detail/omnipic-studio-pro/cokoeaaaglgcljahaffjeijomhmkljlc" rel="noopener noreferrer"&gt;https://chromewebstore.google.com/detail/omnipic-studio-pro/cokoeaaaglgcljahaffjeijomhmkljlc&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
    </item>
    <item>
      <title>How to Recover Original Images from CDN Thumbnails: A Deep Dive into Image Processing Parameters</title>
      <dc:creator>eden zhang</dc:creator>
      <pubDate>Tue, 01 Sep 2026 02:18:29 +0000</pubDate>
      <link>https://dev.to/eden_zhang/how-to-recover-original-images-from-cdn-thumbnails-a-deep-dive-into-image-processing-parameters-19po</link>
      <guid>https://dev.to/eden_zhang/how-to-recover-original-images-from-cdn-thumbnails-a-deep-dive-into-image-processing-parameters-19po</guid>
      <description>&lt;p&gt;Have you ever right-clicked an image on a website, only to find that the "original" you just saved is actually a tiny, pixelated thumbnail? Websites routinely serve compressed, resized versions of images to speed up page loading — but somewhere on the CDN, the full-resolution original still exists. The good news: in many cases, you can reconstruct or recover the original URL with just a few careful edits. Let's dig into how CDN image processing works and how to reverse it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem: Thumbnails Everywhere
&lt;/h2&gt;

&lt;p&gt;When a website displays an image, the browser sends a request to the CDN. The CDN doesn't just serve the raw file — it applies a chain of image processing operations: resizing, cropping, compression, format conversion. For example, an Alibaba Cloud OSS image URL might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://img.example.com/photo/2024/cover.jpg?x-oss-process=image/resize,w_400/quality,q_75
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells the OSS image processing service to resize the original to 400px wide and compress it to 75% quality. The original file &lt;code&gt;cover.jpg&lt;/code&gt; is still on the bucket — we just need to strip away the processing parameters.&lt;/p&gt;

&lt;h2&gt;
  
  
  How CDN Image Processing Works
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Alibaba Cloud OSS
&lt;/h3&gt;

&lt;p&gt;Aliyun OSS uses the &lt;code&gt;x-oss-process&lt;/code&gt; query parameter. Common operations include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;image/resize,w_400&lt;/code&gt; — resize to 400px width&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;image/quality,q_75&lt;/code&gt; — compress to 75% quality&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;image/resize,m_fill,w_400,h_300&lt;/code&gt; — crop-fill to exact dimensions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;image/format,webp&lt;/code&gt; — convert to WebP&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;image/auto-orient,1&lt;/code&gt; — auto-rotate based on EXIF&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To recover the original, simply remove the entire &lt;code&gt;?x-oss-process=...&lt;/code&gt; parameter. The remaining URL points directly to the untouched original file.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tencent Cloud COS
&lt;/h3&gt;

&lt;p&gt;Tencent COS uses a similar mechanism with the &lt;code&gt;imageMogr2&lt;/code&gt; parameter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://img.example.com/photo/2024/cover.jpg?imageMogr2/thumbnail/400x/quality/75
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Operations are chained with slashes after &lt;code&gt;imageMogr2/&lt;/code&gt;. Removing the query string restores the original.&lt;/p&gt;

&lt;h3&gt;
  
  
  Qiniu Cloud
&lt;/h3&gt;

&lt;p&gt;Qiniu uses the &lt;code&gt;imageView2&lt;/code&gt; and &lt;code&gt;imageMogr2&lt;/code&gt; styles:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://img.example.com/photo/2024/cover.jpg?imageView2/2/w/400/format/webp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that Qiniu also supports named processing styles (&lt;code&gt;?imageView2/2/w/400&lt;/code&gt;), and sometimes short style aliases defined in the console.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Key Insight: URL Structure Reveals the Original
&lt;/h2&gt;

&lt;p&gt;The critical realization is that &lt;strong&gt;thumbnails are generated on-the-fly from the original&lt;/strong&gt;. The CDN stores only the master file; every thumbnail is produced by a stateless processing pipeline invoked through URL parameters. This means:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The original file always exists on the bucket&lt;/li&gt;
&lt;li&gt;The original URL is the thumbnail URL minus the processing parameters&lt;/li&gt;
&lt;li&gt;If you can identify the parameter pattern, you can recover the original&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Common Parameter Patterns to Strip
&lt;/h2&gt;

&lt;p&gt;Here's a practical checklist for recovering original image URLs:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CDN&lt;/th&gt;
&lt;th&gt;Parameter prefix&lt;/th&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Aliyun OSS&lt;/td&gt;
&lt;td&gt;&lt;code&gt;x-oss-process=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Remove whole query&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tencent COS&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;imageMogr2/&lt;/code&gt;, &lt;code&gt;imageView2/&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Remove whole query&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qiniu&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;imageView2/&lt;/code&gt;, &lt;code&gt;imageMogr2/&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Remove whole query&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;imgix&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;?w=&lt;/code&gt;, &lt;code&gt;?h=&lt;/code&gt;, &lt;code&gt;?auto=&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Remove params or set &lt;code&gt;?w=original&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloudinary&lt;/td&gt;
&lt;td&gt;&lt;code&gt;image/upload/w_400/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Strip path segment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WordPress&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;-300x200.jpg&lt;/code&gt; suffix&lt;/td&gt;
&lt;td&gt;Remove dimension suffix&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For WordPress and similar CMS platforms, the thumbnail is a &lt;strong&gt;separate physical file&lt;/strong&gt; (e.g., &lt;code&gt;cover-300x200.jpg&lt;/code&gt;), so you can't strip parameters — but you can guess the original filename by removing the dimension suffix: &lt;code&gt;cover-300x200.jpg&lt;/code&gt; → &lt;code&gt;cover.jpg&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Edge Cases and Challenges
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Signed URLs
&lt;/h3&gt;

&lt;p&gt;Some CDNs (especially private buckets) require signed URLs with expiration timestamps. Stripping parameters from a signed URL breaks the signature. In this case, you need the correct signing key or the original signed URL for the full-size asset.&lt;/p&gt;

&lt;h3&gt;
  
  
  Custom Styles
&lt;/h3&gt;

&lt;p&gt;Qiniu and other providers allow defining named styles (e.g., &lt;code&gt;?imageMogr2/thumbnail/...&lt;/code&gt; aliased as &lt;code&gt;?style=thumb&lt;/code&gt;). These are harder to reverse because the mapping isn't visible in the URL.&lt;/p&gt;

&lt;h3&gt;
  
  
  Progressive WebP
&lt;/h3&gt;

&lt;p&gt;Many CDNs now auto-convert to WebP based on the &lt;code&gt;Accept&lt;/code&gt; header, adding &lt;code&gt;format/webp&lt;/code&gt; to the chain. Removing this parameter may return the JPEG/PNG original.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hotlink Protection
&lt;/h3&gt;

&lt;p&gt;If the site has referer-based hotlink protection, stripping parameters might trigger a 403. The original still exists, but the server blocks direct access from non-approved referers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Automation: Detecting and Recovering at Scale
&lt;/h2&gt;

&lt;p&gt;Doing this manually for hundreds of images is tedious. The pattern-based nature of CDN URLs makes it perfect for automation:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Parse the URL&lt;/strong&gt;: extract query parameters or path segments&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Match known patterns&lt;/strong&gt;: detect &lt;code&gt;x-oss-process&lt;/code&gt;, &lt;code&gt;imageMogr2&lt;/code&gt;, &lt;code&gt;imageView2&lt;/code&gt;, dimension suffixes, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generate candidate original URLs&lt;/strong&gt;: strip processing params, try dimension variants&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify with a HEAD request&lt;/strong&gt;: check HTTP status code and &lt;code&gt;Content-Length&lt;/code&gt; to confirm the original is accessible&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fall back to the best available&lt;/strong&gt;: if the true original is unavailable, pick the highest-resolution variant&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is exactly the kind of problem where a well-designed browser extension shines.&lt;/p&gt;

&lt;h2&gt;
  
  
  OmniPic: CDN Original Image Restoration, Built In
&lt;/h2&gt;

&lt;p&gt;As you can see, recovering original images from CDN thumbnails requires understanding each provider's parameter conventions, handling edge cases, and automating verification — a significant amount of engineering work to do properly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OmniPic AI Studio Pro&lt;/strong&gt; packages CDN original image restoration into a ready-to-use browser extension. When you crawl images from any website, OmniPic automatically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recognizes CDN URL patterns&lt;/strong&gt; from Alibaba Cloud OSS, Tencent COS, Qiniu, and other major providers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restores original high-resolution URLs&lt;/strong&gt; by stripping processing parameters intelligently&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verifies accessibility&lt;/strong&gt; with automatic status checks, falling back gracefully when an original is protected&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Batches the process&lt;/strong&gt; across hundreds or thousands of images with one click&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But CDN restoration is just one piece of OmniPic's complete image workflow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Full-site crawling with auto-classification&lt;/strong&gt; — every image detected and sorted into 4K Ultra HD, 1080P HD, medium, and thumbnail categories&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-device AI reverse image search&lt;/strong&gt; — MobileNet 1024-dim feature extraction with WebGPU acceleration, finding similar images in under 50ms entirely on your device&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pHash visual deduplication&lt;/strong&gt; — automatically filter duplicates even when images are cropped, recompressed, or watermarked&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Eagle/Billfish integration&lt;/strong&gt; — push selected images straight into your local design asset library&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streaming ZIP packaging&lt;/strong&gt; — download 2000+ images in one ZIP without freezing your browser&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;100% local processing&lt;/strong&gt; — your images never touch any server&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Get Started
&lt;/h2&gt;

&lt;p&gt;OmniPic AI Studio Pro is available on all three major browser extension stores:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Chrome&lt;/strong&gt;: &lt;a href="https://chromewebstore.google.com/detail/omnipic-studio-pro/cokoeaaaglgcljahaffjeijomhmkljlc" rel="noopener noreferrer"&gt;Chrome Web Store&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Edge&lt;/strong&gt;: Microsoft Edge Add-ons&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Firefox&lt;/strong&gt;: Firefox Add-ons&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whether you're a designer collecting inspiration at full quality, an e-commerce operator archiving product images, or a researcher building image datasets, OmniPic turns the hidden complexity of CDN image processing into a one-click experience. The originals are out there — now you can actually get them.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Understanding Perceptual Hashing: How to Identify Similar Images with a 64-bit Fingerprint</title>
      <dc:creator>eden zhang</dc:creator>
      <pubDate>Mon, 31 Aug 2026 03:48:23 +0000</pubDate>
      <link>https://dev.to/eden_zhang/understanding-perceptual-hashing-how-to-identify-similar-images-with-a-64-bit-fingerprint-4i15</link>
      <guid>https://dev.to/eden_zhang/understanding-perceptual-hashing-how-to-identify-similar-images-with-a-64-bit-fingerprint-4i15</guid>
      <description>&lt;p&gt;Why Traditional Hashing Fails for Images&lt;br&gt;
When you need to deduplicate thousands of images scraped from a website, your first instinct might be to use MD5 or SHA-256. After all, these cryptographic hashes are the standard way to detect identical files.&lt;br&gt;
But here's the problem: two images that look identical to the human eye can have completely different MD5 hashes. A slight compression, a re-encode, a cropped border, or an added watermark changes every byte of the file — even though the visual content is essentially the same.&lt;br&gt;
What you need is a perceptual hash — a fingerprint that captures the visual essence of an image, not its exact byte sequence.&lt;br&gt;
How pHash Works: The DCT Approach&lt;br&gt;
The most popular perceptual hashing algorithm is pHash, which stands for "perceptual hash." It uses the Discrete Cosine Transform (DCT) — the same mathematical foundation behind JPEG compression.&lt;br&gt;
Here's the step-by-step pipeline:&lt;br&gt;
Step 1: Image Preprocessing&lt;br&gt;
Resize the image to 32×32 pixels&lt;br&gt;
Convert to grayscale&lt;br&gt;
This reduces noise and normalizes dimensions&lt;br&gt;
Step 2: Apply DCT&lt;br&gt;
Compute the 2D Discrete Cosine Transform on the 32×32 image&lt;br&gt;
DCT transforms the image from the spatial domain into the frequency domain&lt;br&gt;
The top-left 8×8 coefficients represent the lowest frequencies — the most visually significant patterns&lt;br&gt;
Step 3: Extract Low-Frequency Coefficients&lt;br&gt;
Keep only the top-left 8×8 block (64 coefficients)&lt;br&gt;
These 64 values capture the coarse structure of the image, ignoring fine details and noise&lt;br&gt;
Step 4: Compute the Median&lt;br&gt;
Calculate the median value of these 64 coefficients&lt;br&gt;
The median is used as the threshold because it's robust to outliers&lt;br&gt;
Step 5: Generate the 64-bit Hash&lt;br&gt;
For each of the 64 coefficients: set the bit to 1 if the coefficient is above the median, 0 otherwise&lt;br&gt;
The result is a 64-bit (16 hex character) fingerprint&lt;br&gt;
Why This Works: Robustness to Transformations&lt;br&gt;
The magic of pHash lies in its robustness:&lt;br&gt;
Compression/re-encoding: DCT low frequencies are preserved even under heavy compression&lt;br&gt;
Resizing: The 32×32 preprocessing normalizes all images to the same dimensions&lt;br&gt;
Brightness/contrast changes: The median threshold adapts to overall brightness shifts&lt;br&gt;
Minor crops: Low-frequency patterns remain largely intact&lt;br&gt;
Measuring Similarity: Hamming Distance&lt;br&gt;
To compare two pHash fingerprints, you compute the Hamming distance — the number of bits that differ between the two 64-bit hashes.&lt;br&gt;
Distance 0: Identical hash (very likely the same image)&lt;br&gt;
Distance 1-5: Very similar images (different compression, minor edits)&lt;br&gt;
Distance 6-10: Possibly related images&lt;br&gt;
Distance &amp;gt;10: Different images&lt;br&gt;
In practice, a threshold of 5-10 works well for most deduplication tasks.&lt;br&gt;
Implementation Challenges&lt;br&gt;
While the pHash algorithm sounds straightforward, implementing it at scale presents real challenges:&lt;br&gt;
Performance: Computing DCT for thousands of images can be slow. Optimized implementations use precomputed cosine tables and SIMD instructions.&lt;br&gt;
Memory: Storing 64-bit hashes for 10,000 images is trivial (80KB), but computing pairwise Hamming distances is O(n²) — 50 million comparisons for 10,000 images.&lt;br&gt;
False positives/negatives: The threshold is a tradeoff. Too low and you miss duplicates; too high and you flag distinct images as duplicates.&lt;br&gt;
Text-heavy images: pHash works best for photographs. Images with lots of text or sharp edges may produce less reliable hashes.&lt;br&gt;
OmniPic: pHash Deduplication Built In&lt;br&gt;
Implementing all of this — image preprocessing, DCT computation, Hamming distance matching, threshold tuning — into a polished tool is a significant engineering effort.&lt;br&gt;
OmniPic AI Studio Pro packages pHash visual deduplication into a ready-to-use browser extension. When you crawl images from any website, OmniPic automatically:&lt;br&gt;
Computes pHash fingerprints for every detected image&lt;br&gt;
Identifies and groups visually similar duplicates&lt;br&gt;
Lets you filter out duplicates with one click&lt;br&gt;
Works even when images have been cropped, compressed, or watermarked&lt;br&gt;
But pHash deduplication is just one piece of OmniPic's full image workflow:&lt;br&gt;
Full-Site Image Crawling &amp;amp; Auto-Classification&lt;br&gt;
Automatically crawl all images from the current page (or entire sites), auto-classified by resolution into 4K Ultra HD, 1080P HD, medium-large, and thumbnail categories.&lt;br&gt;
CDN Original Image Restoration&lt;br&gt;
Automatically recognize URL patterns from Alibaba Cloud OSS, Tencent COS, Qiniu, and other CDNs to restore original high-resolution image addresses — so you download the source quality, not compressed thumbnails.&lt;br&gt;
On-Device AI Reverse Image Search&lt;br&gt;
Powered by MobileNet 1024-dimensional feature extraction with WebGPU acceleration, OmniPic finds visually similar images among all crawled images in under 50ms — entirely on your device, with no data leaving your browser.&lt;br&gt;
Eagle/Billfish Direct Integration&lt;br&gt;
Push selected images directly to your Eagle or Billfish local design asset library, or stream-pack them into a ZIP file (supports 2000+ images without freezing your browser).&lt;br&gt;
100% Local Processing, Privacy First&lt;br&gt;
All image processing, hashing, AI inference, and data storage happen locally in your browser. Your images never touch any server.&lt;br&gt;
Get Started&lt;br&gt;
OmniPic AI Studio Pro is available on all three major browser extension stores:&lt;br&gt;
Chrome: Chrome Web Store&lt;br&gt;
Edge: Microsoft Edge Add-ons&lt;br&gt;
Firefox: Firefox Add-ons&lt;br&gt;
Whether you're a designer collecting inspiration, an e-commerce operator scraping product images, or a content creator building image libraries, OmniPic turns the complex mathematics of perceptual hashing and AI feature extraction into one-click simplicity.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Your Image Scraping Shouldn't Send Your Data to the Cloud — OmniPic Keeps It Local</title>
      <dc:creator>eden zhang</dc:creator>
      <pubDate>Sun, 30 Aug 2026 06:14:15 +0000</pubDate>
      <link>https://dev.to/eden_zhang/your-image-scraping-shouldnt-send-your-data-to-the-cloud-omnipic-keeps-it-local-588l</link>
      <guid>https://dev.to/eden_zhang/your-image-scraping-shouldnt-send-your-data-to-the-cloud-omnipic-keeps-it-local-588l</guid>
      <description>&lt;p&gt;If you're a designer, e-commerce operator, or content creator — have you ever wondered where the images you scrape from websites actually go?&lt;/p&gt;

&lt;p&gt;Traditional scraping tools often upload your images to cloud servers for processing. Your assets, your product research data, your inspiration library... all of it passes through third-party servers. That never felt quite right.&lt;/p&gt;

&lt;p&gt;That's why I built &lt;strong&gt;OmniPic AI Studio Pro&lt;/strong&gt; — a browser extension that does everything on-device. Now available on &lt;strong&gt;Chrome, Edge, and Firefox&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it's privacy-first
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;On-device AI reverse image search&lt;/strong&gt; — MobileNet 1024-dim features + WebGPU acceleration. Your images never leave your computer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pHash visual deduplication&lt;/strong&gt; — computed locally, zero cloud dependency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Whole-site image crawling with auto-categorization&lt;/strong&gt;, plus CDN original-image restoration (Aliyun OSS, Tencent COS, Qiniu).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Direct Eagle/Billfish integration&lt;/strong&gt; — plug straight into your asset library.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stream 2000+ images as a ZIP&lt;/strong&gt; — batch download without freezing your browser.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;100% local processing. Privacy-first. Your images belong to you, and only you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Chrome&lt;/strong&gt;: &lt;a href="https://chromewebstore.google.com/detail/omnipic-studio-pro/cokoeaaaglgcljahaffjeijomhmkljlc" rel="noopener noreferrer"&gt;https://chromewebstore.google.com/detail/omnipic-studio-pro/cokoeaaaglgcljahaffjeijomhmkljlc&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Also available on &lt;strong&gt;Edge&lt;/strong&gt; and &lt;strong&gt;Firefox&lt;/strong&gt; — just search "OmniPic"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Give it a try if you're tired of your assets being silently uploaded somewhere.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I Built a Browser Extension That Optimizes Your Resume for ATS Systemsfor ATS Systems</title>
      <dc:creator>eden zhang</dc:creator>
      <pubDate>Fri, 28 Aug 2026 08:14:20 +0000</pubDate>
      <link>https://dev.to/eden_zhang/i-built-a-browser-extension-that-optimizes-your-resume-for-ats-systemsfor-ats-systems-497i</link>
      <guid>https://dev.to/eden_zhang/i-built-a-browser-extension-that-optimizes-your-resume-for-ats-systemsfor-ats-systems-497i</guid>
      <description>&lt;p&gt;Hey everyone,&lt;/p&gt;

&lt;p&gt;I've been working on ResumeRadar - a browser extension that helps job seekers optimize their resumes for ATS (Applicant Tracking System) compatibility. Now available on Chrome, Edge &amp;amp; Firefox!&lt;/p&gt;

&lt;p&gt;Key features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ATS compatibility check - One-click analysis of your resume&lt;/li&gt;
&lt;li&gt;Keyword optimization - Smart recommendations based on target job descriptions&lt;/li&gt;
&lt;li&gt;Resume scoring - Multi-dimensional scoring from format, content, keywords&lt;/li&gt;
&lt;li&gt;Real-time feedback - See score changes as you edit your resume&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why ResumeRadar?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On-device AI processing - your resume data never leaves your browser&lt;/li&gt;
&lt;li&gt;100% local processing, privacy-first&lt;/li&gt;
&lt;li&gt;Supports both English and Chinese resumes&lt;/li&gt;
&lt;li&gt;Available on Chrome, Edge &amp;amp; Firefox&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Install now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chrome: &lt;a href="https://chromewebstore.google.com/detail/resumeradar-ats-resume/hnfakgemddooanelfmdbljjdjfekcggd" rel="noopener noreferrer"&gt;https://chromewebstore.google.com/detail/resumeradar-ats-resume/hnfakgemddooanelfmdbljjdjfekcggd&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Edge / Firefox: Search "ResumeRadar" in the add-on store&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Stop letting your resume get filtered out by machines. Try ResumeRadar today!&lt;/p&gt;

</description>
      <category>resumeatsjobsearchproductivity</category>
    </item>
    <item>
      <title>I Built a Browser Extension That Crawls Entire Websites for Images</title>
      <dc:creator>eden zhang</dc:creator>
      <pubDate>Fri, 28 Aug 2026 07:48:36 +0000</pubDate>
      <link>https://dev.to/eden_zhang/i-built-a-browser-extension-that-crawls-entire-websites-for-images-8l2</link>
      <guid>https://dev.to/eden_zhang/i-built-a-browser-extension-that-crawls-entire-websites-for-images-8l2</guid>
      <description>&lt;p&gt;Hey everyone,&lt;/p&gt;

&lt;p&gt;I've been working on OmniPic AI Studio Pro - a browser extension for designers, e-commerce ops, and content creators who need to collect images from websites efficiently. Now available on Chrome, Edge &amp;amp; Firefox!&lt;/p&gt;

&lt;h2&gt;
  
  
  Key features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Full-site crawling&lt;/strong&gt;: Automatically scans navigation and categories, then crawls all images with auto-categorization&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CDN original image restoration&lt;/strong&gt;: Automatically removes thumbnail suffixes from Aliyun OSS, Tencent COS, Qiniu, etc. to get original HD images&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-device AI reverse image search&lt;/strong&gt;: MobileNet 1024-dim visual vectors running entirely in your browser - 0 cloud cost, 100% offline privacy&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pHash visual deduplication&lt;/strong&gt;: Millisecond-level detection of similar images with different compression/color grading&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Eagle/Billfish direct integration&lt;/strong&gt;: One-click push images + tags + source URL to your local Eagle library&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Floating action capsule&lt;/strong&gt;: Hover over any image to see resolution, one-click download, copy direct link&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2000+ images second-level streaming ZIP packing&lt;/strong&gt; without browser freezing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;100% local processing&lt;/strong&gt;: All image parsing, deduplication, transcoding happens in your browser sidebar - no data sent anywhere&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tech stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Chrome Extension Manifest V3&lt;/li&gt;
&lt;li&gt;WebGPU for on-device AI inference&lt;/li&gt;
&lt;li&gt;2D-DCT pHash for perceptual hashing&lt;/li&gt;
&lt;li&gt;STORE streaming storage for large ZIP archives&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Would love to hear your feedback! Available on Chrome Web Store, Edge Add-ons, and Firefox Add-ons.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Daily Crypto Market Analysis - August 25, 2026 - BTC $80,962</title>
      <dc:creator>eden zhang</dc:creator>
      <pubDate>Tue, 25 Aug 2026 02:51:56 +0000</pubDate>
      <link>https://dev.to/eden_zhang/daily-crypto-market-analysis-august-25-2026-btc-80962-2k5o</link>
      <guid>https://dev.to/eden_zhang/daily-crypto-market-analysis-august-25-2026-btc-80962-2k5o</guid>
      <description>&lt;h2&gt;
  
  
  Daily Crypto Market Analysis - August 25, 2026 - BTC $80,962
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Market Overview&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The crypto market kicked off the week with broad green across the board. Bitcoin surged past the $81,000 mark, gaining 4.56% in the last 24 hours, while altcoins followed suit with notable strength. The Fear &amp;amp; Greed Index sits at &lt;strong&gt;74 (Greed)&lt;/strong&gt;, reflecting growing bullish sentiment among investors.&lt;/p&gt;

&lt;h3&gt;
  
  
  Price Snapshot
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Asset&lt;/th&gt;
&lt;th&gt;Price (USD)&lt;/th&gt;
&lt;th&gt;24h Change&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Bitcoin (BTC)&lt;/td&gt;
&lt;td&gt;$80,962&lt;/td&gt;
&lt;td&gt;+4.56%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ethereum (ETH)&lt;/td&gt;
&lt;td&gt;$2,525.98&lt;/td&gt;
&lt;td&gt;+3.20%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Solana (SOL)&lt;/td&gt;
&lt;td&gt;$102.12&lt;/td&gt;
&lt;td&gt;+7.75%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BNB&lt;/td&gt;
&lt;td&gt;$718.44&lt;/td&gt;
&lt;td&gt;+2.52%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ripple (XRP)&lt;/td&gt;
&lt;td&gt;$1.54&lt;/td&gt;
&lt;td&gt;+3.41%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dogecoin (DOGE)&lt;/td&gt;
&lt;td&gt;$0.09282&lt;/td&gt;
&lt;td&gt;+0.85%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Fear &amp;amp; Greed Index
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;74 �ü” Greed&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The index ticked further into Greed territory, signaling elevated market optimism. While this reflects strong momentum, traders should remain cautious as extreme greed often precedes short-term corrections.&lt;/p&gt;

&lt;h3&gt;
  
  
  Market Analysis
&lt;/h3&gt;

&lt;p&gt;Bitcoin's rally above $80K marks a significant psychological milestone, driven by sustained institutional inflows and improving macro conditions. Ethereum follows with a solid 3.20% gain, holding above $2,500, supported by continued Layer 2 adoption and staking demand.&lt;/p&gt;

&lt;p&gt;Solana steals the spotlight today with a standout &lt;strong&gt;7.75% surge&lt;/strong&gt;, the strongest among the tracked assets. The momentum appears tied to renewed DeFi activity and NFT volume on the Solana network. BNB and XRP posted moderate gains of 2.52% and 3.41% respectively, while DOGE lagged slightly with a modest 0.85% uptick.&lt;/p&gt;

&lt;p&gt;The overall market cap continues to climb, with altcoins showing relative strength �ü” a sign that capital is rotating beyond BTC into the broader ecosystem.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Takeaways
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;BTC breaks above $80K with strong 4.56% daily gain&lt;/li&gt;
&lt;li&gt;Solana leads altcoins with a 7.75% surge on DeFi momentum&lt;/li&gt;
&lt;li&gt;Fear &amp;amp; Greed Index at 74 (Greed) �ü” bullish but watch for overheating&lt;/li&gt;
&lt;li&gt;Altcoin season indicators are flashing as capital rotates from BTC&lt;/li&gt;
&lt;li&gt;Key resistance: BTC $82,500 / Support: BTC $78,000&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Powered by &lt;a href="https://alphacast.io" rel="noopener noreferrer"&gt;AlphaCast&lt;/a&gt; �ü” Your AI-driven crypto market intelligence platform.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
