Journal
Nov 19, 2026·3 min read· WebGL

Shrinking GLB models for the web

Models from marketplaces are made to look good in a viewer, not to be downloaded on a train. A sofa I used arrived at 21 MB with 123,000 triangles. It ships at 1.5 MB with 12,000, and in the room you cannot tell.

Where the weight is

Almost always the textures. That sofa carried four images, the largest nearly 9 MB. Geometry was the smaller problem.

The pipeline

I use glTF-Transform from the command line, in this order:

  1. weld — merge identical vertices, so the next step has something to work with.
  2. simplify — reduce triangles to a ratio, with an error limit so silhouettes survive.
  3. resize — cap textures at 1024 px. Furniture seen from two metres never needs more.
  4. webp — re-encode textures. This is where most megabytes go.
  5. meshopt — compress the geometry. three.js decodes it with a small decoder that drei's loader already wires up.

How far to go

Look at the result where it will be seen, at the size it will be seen. A phone model on a desk is a few centimetres tall on screen; mine went from 51,000 triangles to a fifth of that with no visible change. A hero object filling the screen deserves more care.

Two cautions

  • Simplifying can break parts you address by name. My laptop's screen is a named material I replace at runtime, so I checked it survived.
  • Check the licence before you check the file size. A model marked non-commercial does not belong on a portfolio that is meant to find you work, however light it is.