> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bitiful.com/en/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bitiful.com/_mcp/server.
> If something on this page is wrong or missing, POST JSON {"page": "<page URL>", "message": "<what is wrong>"} to https://docs.bitiful.com/_biti/feedback/agent.

# E-commerce and retail

> Store and distribute product images and page assets for e-commerce platforms, brand websites, and retail mini programs: multiple sizes from one image, white-background trimming and smart cropping, brand watermarks, similar products and color filters, protection against competitors copying images, prefetch and purge for big sales, and migration from an old platform without downtime.

Product images directly affect conversion. They need to be **sharp, fast to load, and consistent in style**, and fit lists, detail pages, search results, share cards, and every kind of screen. Competitors and reseller sites often hotlink product images directly. During big sales, traffic can multiply within minutes.

## Typical challenges

| Challenge             | What it looks like                                                                                            |
| --------------------- | ------------------------------------------------------------------------------------------------------------- |
| Too many sizes        | One product image needs a dozen or more sizes, and merchants upload originals with all kinds of aspect ratios |
| Inconsistent style    | White-background margins vary, and the product sits off-center                                                |
| Heavy pages           | Detail pages have dozens of large images and load slowly on mobile                                            |
| Image theft           | Other stores and reseller sites hotlink your product images                                                   |
| Finding similar items | Shoppers want to "find the same item" or "filter by color"                                                    |
| Big-sale peaks        | Traffic spikes the moment a sale starts, and old images stay in the cache after you replace them              |

## Industry examples

> **Note**
>
> The products mentioned here only illustrate common needs in the industry and don't imply that they use Bitiful.

### Marketplace stores: main image guidelines on platforms like Taobao and Pinduoduo

**Background**: E-commerce platforms commonly require the main product image to be square, with a clean background and the product centered. Merchants' originals vary in aspect ratio and margins, so they often have designers fix them one by one, which becomes a bottleneck as the number of SKUs grows.

**How Bitiful helps**:

- Pair each original with a `main` [style](https://docs.bitiful.com/en/coreix/handbook/styles.md): `trim=auto` first removes the white margins around the edges, then `mode=fill` fits the product proportionally onto a square white canvas, so products appear the same size;
- Add `enhance` to casual product snapshots to improve them in one step, and use `fmt=tpng` to compress PNGs with transparent backgrounds;
- The same original outputs list images, detail images, and share cards, and both the storefront design and mini programs reference the same URL.

**Result**: New listings no longer get stuck waiting for retouching, product images look consistent across the store, and detail pages load faster.

### Cross-border e-commerce: global sites like SHEIN and Temu

**Background**: Users are spread around the world with very different network conditions. There are huge numbers of product images, and competitor and knockoff sites copy images directly.

**How Bitiful helps**:

- Turn on global nodes for the CDN domain, and `fmt=auto` outputs AVIF/WebP based on the browser, so images are noticeably smaller in regions with poor networks;
- Use `fmt=featureprint` for reverse image search and "similar products" recommendations, and `fmt=palette` for filtering by color;
- [Referer hotlink protection](https://docs.bitiful.com/en/cdn/handbook/access-control.md) refuses embedding by external sites, and you can confirm it works in the referring site ranking in [Top content](https://docs.bitiful.com/en/console/popular.md);
- Before a big sale, [prefetch](https://docs.bitiful.com/en/cdn/handbook/cache.md) campaign pages and featured product images on the **Cache purge** page, and watch bandwidth by the minute in [Usage](https://docs.bitiful.com/en/console/usage.md) during the campaign.

**Result**: Pages open faster for overseas users, search and recommendations are more accurate, and you no longer pay for traffic from stolen images.

## What each part of Bitiful does

| Capability                                                                                                            | What it does here                                                                                                            |
| --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| [S4 object storage](https://docs.bitiful.com/en/bitiful-s4/intro.md)                                                  | Stores a single copy of each original product image and the static page assets                                               |
| [Presigned URLs](https://docs.bitiful.com/en/developer/s3/presigned-url.md)                                           | The merchant dashboard uploads product images directly, bypassing your application servers                                   |
| [Trim borders](https://docs.bitiful.com/en/coreix/features/trim.md)                                                   | Automatically removes white or transparent margins around product images so products appear the same size                    |
| [Resize and smart crop](https://docs.bitiful.com/en/coreix/features/resize.md)                                        | Outputs every size (list, detail, thumbnail, share) from one original, and `pos=smart` keeps the product in frame            |
| [Shapes and canvas](https://docs.bitiful.com/en/coreix/features/draw-canvas.md)                                       | Adds uniform padding and rounded corners for consistent product cards                                                        |
| [Color adjustment and auto enhance](https://docs.bitiful.com/en/coreix/features/adjust.md)                            | `enhance` improves casual merchant snapshots in one step                                                                     |
| [Image format conversion](https://docs.bitiful.com/en/coreix/features/fmt.md)                                         | `fmt=auto` outputs AVIF/WebP and greatly reduces detail page size; `fmt=tpng` compresses PNGs with transparency              |
| [Image watermarks](https://docs.bitiful.com/en/coreix/features/watermark-image.md)                                    | Overlays a brand or store logo on product images                                                                             |
| [Image analysis](https://docs.bitiful.com/en/coreix/features/analysis.md)                                             | `fmt=featureprint` powers "find the same item", `fmt=palette` powers color filters, and `fmt=tags` categorizes automatically |
| [BlurHash / ThumbHash](https://docs.bitiful.com/en/bitiful-s4/features/hash-placeholder.md)                           | Lists show a blurred placeholder first for smoother scrolling                                                                |
| [CDN](https://docs.bitiful.com/en/cdn/intro.md) and [cache rules](https://docs.bitiful.com/en/cdn/handbook/rules.md)  | Cache product images and static assets for a long time while keeping entry pages up to date                                  |
| [Hotlink protection](https://docs.bitiful.com/en/cdn/handbook/access-control.md)                                      | Allows only your own website, app, and mini programs to embed product images                                                 |
| [Purge and prefetch](https://docs.bitiful.com/en/cdn/handbook/cache.md)                                               | Prefetch campaign page assets before a big sale, and purge old images after replacing them                                   |
| [Mirror back-to-origin](https://docs.bitiful.com/en/bitiful-s4/handbook/mirror.md)                                    | Migrates large numbers of product images from an old platform without interrupting business                                  |
| [Usage](https://docs.bitiful.com/en/console/usage.md) / [Top content](https://docs.bitiful.com/en/console/popular.md) | Track per-minute bandwidth, best-selling products, and hotlinking sources during big sales                                   |

## Recommended architecture

### Merchants upload originals directly

The merchant dashboard requests an [upload link](https://docs.bitiful.com/en/developer/s3/presigned-url.md) from your application server and uploads the original straight to `products/{productID}/{index}.jpg`. After the upload, compute [`fmt=thumbhash`](https://docs.bitiful.com/en/bitiful-s4/features/hash-placeholder.md) and [`fmt=palette`](https://docs.bitiful.com/en/coreix/features/analysis.md) once and save them with the product.

### Define product image styles

| Purpose           | Style name | Example parameters                           |
| ----------------- | ---------- | -------------------------------------------- |
| List              | `list`     | `trim=auto&w=480&h=480&mode=fill&fmt=auto`   |
| Main detail image | `main`     | `trim=auto&w=1200&h=1200&mode=fill&fmt=auto` |
| Long detail image | `detail`   | `w=1080&fmt=auto&q=80`                       |
| Share card        | `share`    | `w=1200&h=630&pos=smart&fmt=jpg`             |

[Trimming](https://docs.bitiful.com/en/coreix/features/trim.md) first and then [fitting proportionally into a square canvas](https://docs.bitiful.com/en/coreix/features/resize.md) keeps every product the same size on a uniform background.

### Distribute through the CDN with hotlink protection

Bind a [CDN domain](https://docs.bitiful.com/en/cdn/handbook/domains.md) and use [edge rules](https://docs.bitiful.com/en/cdn/handbook/rules.md) to:

- Cache product images and hashed JS/CSS for a long time, and don't cache HTML entry pages or cache them only briefly.
- Allow only your own domains as the Referer ([hotlink protection](https://docs.bitiful.com/en/cdn/handbook/access-control.md)), and allow an empty Referer as needed for apps and mini programs.
- Block known image scraping tools.

### Find the same item and filter by color

Call `?w=512&fmt=featureprint` on each new product's main image and write the feature vector to a vector database. When a shopper uploads an image or clicks "find similar", search for the closest products. Use the dominant colors returned by `palette` for color filters.

### Prepare for big sales

The day before a sale, [prefetch](https://docs.bitiful.com/en/cdn/handbook/cache.md) the campaign pages and featured product images on the **Cache purge** page. During the sale, monitor bandwidth at 1-minute granularity in [Usage](https://docs.bitiful.com/en/console/usage.md). After a last-minute image swap, submit a URL purge.

## Key practices

### Standardize white-background product images

Merchants upload white-background images with varying margins, so resizing them directly makes some products look large and others small. `trim=auto` first removes the solid-color background around the edges, then `mode=fill` fits the image proportionally into a canvas of uniform size, keeping list pages neat. See [Trim borders](https://docs.bitiful.com/en/coreix/features/trim.md) and [Resize images](https://docs.bitiful.com/en/coreix/features/resize.md).

### Replace images without waiting for the cache

Use versioned file names for product images (for example, `1-v2.jpg`). When you replace an image, reference the new address directly and the old cache doesn't matter. If you must keep the original address, submit a [URL purge](https://docs.bitiful.com/en/cdn/handbook/cache.md).

### Take back hotlinked traffic

The **Referring site** ranking in [Top content](https://docs.bitiful.com/en/console/popular.md) shows which external websites embed your product images. Once you turn on [Referer hotlink protection](https://docs.bitiful.com/en/cdn/handbook/access-control.md), the traffic charges for those requests go away.

## Cost tips

- One original with multiple styles saves storing a separate image for every size.
- Switching detail pages to `fmt=auto` usually cuts data transfer charges significantly and improves mobile conversion.
- Before a big sale, buy [resource packages](https://docs.bitiful.com/en/prices/handbook/resource-packages.md) based on expected traffic.

## Launch checklist

- [ ] The merchant dashboard uses presigned direct uploads and doesn't expose keys
- [ ] Lists, main images, detail pages, and share cards all use styles
- [ ] The CDN domain has cache rules and Referer hotlink protection configured
- [ ] Placeholders, dominant colors, and feature vectors are computed automatically for new products
- [ ] Prefetch is done before big sales, and someone watches Usage during the sale

## Related docs

- [Trim borders](https://docs.bitiful.com/en/coreix/features/trim.md)
- [Resize images](https://docs.bitiful.com/en/coreix/features/resize.md)
- [Image analysis](https://docs.bitiful.com/en/coreix/features/analysis.md)
- [Cache, purge, and prefetch](https://docs.bitiful.com/en/cdn/handbook/cache.md)
- [Mirror back-to-origin](https://docs.bitiful.com/en/bitiful-s4/handbook/mirror.md)
