Shopee, Lazada and Tiki image URLs: the suffix picks the format, not the Accept header
On several image CDNs I tested this month, the same URL returns different bytes depending on the browser's Accept header. Wix and Dribbble's imgproxy do it and send Vary: Accept so caches keep the copies apart, and Shopi
On several image CDNs I tested this month, the same URL returns different bytes depending on the browser's Accept header. Wix and Dribbble's imgproxy do it and send Vary: Accept so caches keep the copies apart, and Shopify's CDN switched formats with the header too.
The three big marketplace CDNs in Southeast Asia don't. On Shopee, Lazada and Tiki the format and the size are both written into the URL, and the server returns the same file whatever the browser says it accepts. I measured this on 16 November 2026 with curl, using product thumbnails taken from a search for "bรฌnh giแปฏ nhiแปt" (vacuum flask) on each site, and sent every request twice: once with Chrome's image Accept header and once with */*.
Shopee: @resize_โฆ and _tn
A Shopee search result thumbnail looks like this:
https://down-vn.img.susercontent.com/file/vn-11134207-81ztc-mu1v1eehy22oef@resize_w320_nl.webp
| Suffix | Type | Size | Bytes |
|---|---|---|---|
@resize_w320_nl.webp |
WebP | 320x320 | 22,684 |
_tn.webp |
WebP | 320x320 | 22,684 |
_tn |
JPEG | 320x320 | 38,555 |
@resize_w800_nl.webp |
WebP | 800x800 | 75,416 |
.webp |
WebP | 1024x1024 | 100,070 |
| (none) | JPEG | 1024x1024 | 867,216 |
So _tn means thumbnail, @resize_w<N> picks a width, and a trailing .webp picks the format. Drop everything after the file ID and you get the uploaded image as JPEG. Note how big that is: the JPEG original is 8.7 times the WebP at the same 1024x1024.
Both Accept values gave identical responses on every row, and there was no Vary header.
Lazada: _<W>x<H>q<Q> plus an optional second extension
Lazada (now img.lazcdn.com, older pages use slatic.net) appends the resize instruction to the original file name:
https://img.lazcdn.com/g/p/c94d7169c793ea7a4590bb06036778e7.jpg_80x80q80.jpg
| Suffix | Type | Bytes |
|---|---|---|
_80x80q80.jpg |
JPEG 80x80 | 4,156 |
_400x400q80.jpg |
JPEG | 10,162 |
_2200x2200q80.jpg_.webp |
WebP | 11,902 |
_2200x2200q80.jpg_.avif |
AVIF | 3,209 |
| (none) | JPEG 1000x1000 | 126,954 |
The _.avif and _.webp endings are a second extension tacked on after the JPEG one, and the server converts to whatever it names. Asking for 2200x2200 does not upscale: the original is only 1000x1000.
Two small surprises. The original JPEG comes back as Content-Type: image/jpg, which is not a registered type, so code that maps MIME types to file extensions needs an entry for it. And when a seller uploaded a PNG, the original stays a PNG: one product photo was a 1254x1254 PNG of 1,644,982 bytes, against 56,283 bytes for its 200x200 thumbnail.
Tiki: a /cache/<W>x<H>/ path segment
Tiki puts the size in the path instead:
https://salt.tikicdn.com/cache/280x280/ts/product/59/55/bd/1446d17fc400afa9cb4aa874f254d5c7.jpg
Removing /cache/280x280 gave an 800x800 JPEG (78,473 bytes) for this product and a 1000x1000 JPEG (111,055 bytes) for a second one under /media/catalog/producttmp/. Adding .webp to the end of a cached URL returns WebP, again regardless of Accept.
Stripping the suffixes
The rules fit in a few regular expressions:
function marketplaceOriginal(src) {
const u = new URL(src);
if (/(^|\.)susercontent\.com$/.test(u.hostname)) {
u.pathname = u.pathname.replace(/(@resize_[^/]+|_tn(\.webp)?|\.webp)$/, '');
} else if (/(^|\.)(lazcdn\.com|slatic\.net)$/.test(u.hostname)) {
u.pathname = u.pathname.replace(/(\.(jpe?g|png))_\d+x\d+q\d+\.\w+(_\.\w+)?$/i, '$1');
} else if (/(^|\.)tikicdn\.com$/.test(u.hostname)) {
u.pathname = u.pathname.replace(/^\/cache\/\d+x\d+/, '').replace(/(\.(jpe?g|png))\.webp$/i, '$1');
}
return u.href;
}
Because none of these servers negotiate on Accept, a URL you rewrite this way returns the same bytes in a script as it does in the browser. That is not true on Wix or Shopify, where a curl without Chrome's header can hand you a different format than the one you saw on screen.
One limit worth knowing: the original is only as large as what the seller uploaded. If a shop posted a 500x500 photo, no suffix trick will give you more.
I use these rules in PixLasso, a Chrome and Edge extension that saves every image on a page (or across open tabs) as originals in one ZIP. The guide to downloading Shopee, 1688 and Amazon product images covers the manual steps for more marketplaces, and there is a Vietnamese version with these Shopee, Lazada and Tiki numbers.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.