← Journal

E-commerce

How to add virtual try-on to your online store

eyeglasses laptop desk, How to add virtual try-on to your online store

Adding virtual try-on to an online shop takes less engineering than most owners expect and more preparation than most expect. The install itself is an app on Shopify, YouCan or Zid, or a single script snippet on any other site. The real work is getting your product data right, deciding what to show shoppers about their camera, and testing on your own products before anyone else sees it.

This guide walks through that preparation in the order we see it go smoothly.

Decide what you are trying to fix first

Virtual try-on is not one feature. It covers at least three different things, and each one asks for different product data:

Pick the one that matches the question your customers actually ask. Eyewear shops hear "will these look too big on me?" Fashion shops hear "what does it look like on a real person?" If you sell both, start with the category that drives most of your returns or most of your pre-sale messages.

Get your frame measurements right before anything else

For glasses, the single thing that makes or breaks a live try-on is whether the frame appears at its true width. A tool that stretches the frame to fit whatever face it sees is a fun filter, but it cannot help anyone decide whether a 52 mm lens is right for them. For a try-on to render at real size, it needs the real numbers.

Most frames print them on the inside of the temple as three figures: lens width, bridge width and temple length, for example 52-18-140. Our post on how to read glasses frame measurements explains each one. Before you enable anything, go through your catalogue and check that:

If you have 3D models of your frames, the model's dimensions should match those printed numbers. A good tool will check a model against its declared millimetres on load and refuse it if they disagree, rather than quietly rescaling. That refusal is a feature. A model that is 10 percent too wide will mislead every shopper who tries it on.

If you do not have 3D models yet, do not let that stop you from preparing the data. Clean measurements are useful on their own, and they are the input for any scanning or modelling work later.

Prepare product photos that a preview can actually use

For clothing previews and on-model photos, the input is a product image, and the output can only be as good as that image. The preview has no other source of truth: it does not know the garment's cut, colour or length except from the pixels you give it. The photo does not need a studio, but it needs to be honest and clear:

Run your own check: take the product photo you plan to use and the kind of picture a shopper will actually upload, which is a phone photo of themselves in an ordinary room with ordinary lighting, and look at the result. If the garment's colour or length is off, fix the product photo before you blame the tool.

Shoppers rely on these previews to answer the question we cover in how to know if clothes will fit when buying online. A preview shows how a garment looks on a body, not whether the size is right, so keep your size chart and measurements next to it rather than treating one as a replacement for the other.

Install: app or snippet

On the three hosted platforms, installation is a store-admin task. You install the app, grant it access to products, and it places a try-on button on your product pages. On Shopify, apps that add elements to a storefront do so through theme app extensions, which you switch on in the theme editor without editing theme code. Shopify's own documentation on theme app extensions explains how that works. YouCan and Zid follow the same idea: install from the app store, then enable the block where you want it.

On a custom site, a WooCommerce shop or anything hand-built, you paste one script snippet into your product page template and tell it which product the page shows. That is the whole integration. Reflektit works this way: it installs as an app on Shopify, YouCan and Zid, or through a single snippet on any other site, and the try-on appears on the store's own product pages rather than sending shoppers somewhere else.

Two things to ask any provider before you install:

  1. When does the heavy code load? Face tracking needs a model file of several megabytes. It should download only when a shopper presses the button, never on page view. If it loads on every product page, your page speed will suffer for the majority who never try it.
  2. Where does the button appear and can you move it? You want it next to the add-to-cart button or the product gallery, where a shopper is deciding, not buried under the reviews.

Write the privacy note before you switch it on

Anything that opens a camera needs a plain-language explanation, and shoppers in Europe and increasingly in the Gulf expect one. You do not need a legal essay. You need three honest sentences on the product page or in the try-on panel itself:

If a provider cannot answer these questions clearly, that is your answer about whether to install it. We wrote more on what to look for in is virtual try-on safe and what happens to your camera data. Update your privacy policy with the same three points so the storefront and the policy say the same thing.

Test on your own face and your own products

Before announcing anything, spend an hour as a shopper:

Treat anything that looks wrong as a data problem first. In our experience the most common cause of a frame looking off is a wrong measurement in the catalogue, not the tool.

Roll out in stages

Enable try-on on ten to twenty best-sellers first. Those are the products with the most traffic, the most questions and the cleanest data, and a batch that size is small enough to check every frame by hand: open each one in the live mirror, confirm its three numbers against the printed temple, and confirm it looks a different width from its neighbours in the list. When one looks off, the fix is almost always in the catalogue row, not the model.

Watch your pre-sale messages for a couple of weeks. Before launch, note how many ask whether a frame will look too wide or whether a garment runs long. If that question has quietened on the products you enabled, extend to the rest of the catalogue in batches of the same size, cleaning measurements as you go. If it has not, the data on those first products is still wrong somewhere, and adding more products will only add more wrong answers.

Virtual try-on is still an early kind of technology, and it is better at some things than others. It can show how a frame sits and how wide it is on a face. It cannot replace a prescription check or tell someone a shoe fits. Set that expectation on the page and shoppers will trust the parts it does well.

If you want to see what a real-size live mirror feels like before you plan any of this for your own shop, you can try it on yourself.

Frequently asked questions

Do I need a developer to add virtual try-on to my store?

Usually not. On Shopify, YouCan and Zid it installs as an app from the store admin. On a custom site you paste one script snippet into your product page template.

What product information does virtual try-on need?

For glasses, the frame's real measurements: lens width, bridge and temple length, and ideally a 3D model. For clothing, a clear front-facing product photo on a plain background.

Will virtual try-on slow down my product pages?

It should not if the heavy parts load only when a shopper presses the try-on button. Ask any provider whether the camera and tracking code loads on page view or on click.

Do I have to update my privacy policy?

Yes, briefly. Say what the camera is used for, that live video stays in the browser if that is the case, and what happens to any photo a shopper chooses to upload.

Keep reading