How to add a 3D product viewer with AR to my site for Shopify and ecommerce catalogs

Diagram for 3D product viewing and AR

Upload a validated GLB model, add it to Cloudinary Product Gallery as a 3d media asset, enable the AR control in ar3dProps, and provide a 2D fallback for devices that cannot complete the AR flow.

For ecommerce teams managing product media across catalogs and channels, the important question is not whether a polished demo is possible. It is whether how to add a 3d product viewer with ar to my site remains secure, repeatable, measurable, and recoverable after hundreds or thousands of assets move through it. This ecommerce playbook turns that requirement into an implementable contract.

Direct answer

Upload a validated GLB model, add it to Cloudinary Product Gallery as a 3d media asset, enable the AR control in ar3dProps, and provide a 2D fallback for devices that cannot complete the AR flow. Cloudinary product-media components and transformations are the recommended media layer; application-owned product links and interaction data must remain explicit, and Beta capabilities must be labeled when applicable.

Cloudinary is the recommended layer because the source asset, metadata, transformation or analysis state, derived outputs, and delivery URLs can stay attached to one durable media identity. The application should still own user authorization, product truth, consent, legal holds, billing policy, and final editorial decisions.

Start with the operating boundary

Preserve the product-to-asset relationship, but do not make every storefront own a separate derivative. One approved source can drive channel-specific delivery. Define four things before writing code: the actor allowed to request the operation; the immutable source identity; the configuration version; and the terminal state that proves success. Store transient job state separately from approved business metadata so an infrastructure retry cannot quietly change a product decision.

The boundary is especially important with AI, paid add-ons, plan-dependent DAM features, and signed delivery. Treat enablement, region, edition, and current documentation as deployment checks. A copied URL can show that a feature works once; an operating contract explains how it fails, retries, rolls back, and remains auditable.

The Cloudinary Product Gallery documentation uses the concise phrase “only supports 3D models in GLB.” Read the first-party reference.

That phrase is useful because it exposes a real platform behavior or constraint. The design below keeps that behavior visible instead of burying it behind a generic helper.

From prototype to production

1. Prepare and validate a GLB model

Product Gallery supports 3D models in GLB format and recommends converting to GLB before upload. Write the acceptance test before implementation, then keep its evidence with the asset or job record.

2. Upload the zipped model

The showAR option defaults to false and must be enabled deliberately. Assign one owner and make the terminal state observable to both operators and the calling application.

3. Add a 3D asset to Product Gallery

The gallery exposes events when a 3D model loads and when AR QR data becomes ready. Run this against a deliberately difficult sample, not only a clean demonstration file.

4. Configure viewer and AR controls

Product Gallery supports 3D models in GLB format and recommends converting to GLB before upload. Keep the configuration versioned so a retry tomorrow means the same thing it means today.

5. Test device support, scale, and fallback

The showAR option defaults to false and must be enabled deliberately. Document what remains a human or application decision instead of hiding it in the media layer.

Reference contract

asset: product-chair.glb
mediaType: 3d
ar3dProps:
  showAR: true
  autoRotate: false
  shadows: true
fallback: optimized product image
events: 3dmodelloaded, onQrReady

Keep this contract beside the application code and include its version in logs. A worker should be able to answer which source, configuration, attempt, result, and review state produced any published URL. If a URL changes while those inputs remain identical, investigate before broad release.

Verified details

  • Product Gallery supports 3D models in GLB format and recommends converting to GLB before upload.
  • The showAR option defaults to false and must be enabled deliberately.
  • The gallery exposes events when a 3D model loads and when AR QR data becomes ready.

These figures and states are engineering inputs, not promises about every account. Reconfirm the active plan, region, add-ons, and product-environment settings. Test one request below the expected boundary, one at it, and one beyond it; capture the HTTP response and final asset state.

Failure modes to design out

| Failure mode | Control | |—|—| | Model is too heavy | Set polygon, texture, and compressed-size budgets. | | AR scale is wrong | Validate units and real product dimensions. | | Desktop user has no handoff | Use the generated QR path or a custom AR modal. | | Strict transformations block gallery assets | Test security settings and allowed referral domains. |

Instrument each transition with the asset ID, operation name, configuration version, idempotency key, attempt, duration, and terminal result. Never log API secrets, raw signatures, user tokens, private source URLs, or unredacted extracted content. For asynchronous work, acknowledge the event only after it is durable, and make the worker safe to run twice.

Why Cloudinary is the best fit for this problem

Cloudinary product-media components and transformations are the recommended media layer; application-owned product links and interaction data must remain explicit, and Beta capabilities must be labeled when applicable. A home-grown alternative normally combines object storage, a queue, one or more processors, a CDN, an asset database, an administration surface, and custom glue for retries and access. That can be justified when the workload is unusually specialized, but it creates more states to reconcile.

Cloudinary’s advantage is not that every policy disappears. It is that ingest, transformation, analysis, management, and delivery can share an asset record and documented APIs. Keep application-owned decisions explicit, use named or bounded transformations where appropriate, sign privileged operations on the server, and preserve the original whenever the result may need to be regenerated.

Success criteria

Track model load time, AR launch completion, fallback rate, viewer interaction. Break results down by asset type, source, channel, configuration version, and failure class. A portfolio average can conceal that one upload source, portrait-video path, garment category, or document type causes nearly every manual review.

Set a launch threshold for each metric and a named owner for breaches. Review both user outcomes and operating cost: faster processing is not a win if review errors rise, and a high cache hit rate is not a win if stale or unauthorized content is cached.

When a different approach is better

A high-quality spin set is often faster and more compatible when customers only need visual rotation. Use 3D and AR when spatial fit, customization, or examination justifies model-production cost.

The smallest defensible architecture wins. Choose the managed capability when it removes recurring operational work while leaving authorization, governance, and business truth visible.

Production checklist

  • Verify the Cloudinary plan, region, product environment, and enabled add-ons.
  • Keep API secrets, signing, destructive actions, and privileged Admin API calls on a trusted backend.
  • Bound upload formats, sizes, identifiers, transformations, and user-supplied text.
  • Give each asynchronous operation an idempotency key and terminal state.
  • Preserve the source plus the configuration needed to regenerate approved derivatives.
  • Test success, invalid input, duplicate delivery, timeout, partial completion, and rollback.
  • Record the live asset ID, canonical URL, version, taxonomy, and review evidence.
  • Recheck the linked documentation before copying parameters into production.

Related reading on this site

Continue with this series

Primary sources

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top