How to Display a 3D Model on Your WordPress Website in 2026
A 3D model lets a visitor turn a product around, zoom in, and see it from every side. That is far more than a flat photo can do. The good news is that WordPress can show 3D models in 2026 without heavy custom work. The less good news is that it does not do so out of the box.
This guide walks you through the whole job. You will learn which file type to use, why WordPress blocks the upload at first, and three ways to put the model on a page. You will also learn how to keep the page fast and what to check when the viewer stays blank.
What You Need Before You Add a 3D Model
You need three things before you start. You need a model file in a web format, a way to upload it, and a viewer that draws it in the browser. WordPress gives you none of these by default, so it helps to know what each part does.
The model file holds the shape, the colors, and the surface images, which are called textures. The viewer is a small piece of JavaScript that reads the file and draws it on the screen. Modern browsers do the drawing with WebGL, a built-in tool that uses the graphics chip in the device. Every current desktop and phone browser supports it, so your visitors do not need to install anything.
You also need the right user role. Only an Administrator can add script tags in the editor or change which file types the site accepts. If you work as an Editor or Author, ask the site admin to do those steps. On a multisite network, only the Super Admin can do them. Check your role under Users → Profile before you begin, so you do not get stuck halfway.
Which 3D File Format Works Best in WordPress?
Use GLB for almost every case. GLB is the binary form of glTF, an open standard built for the web. It packs the shape, the textures, and any motion into one file. One file is easy to upload, easy to move, and hard to break.
The plain glTF form splits the same data into a text file plus loose image files. It works, but each loose file must sit at the exact path the text file expects. The WordPress Media Library sorts uploads into year and month folders, so those paths often break. That is why GLB is the safer pick.
Older formats such as OBJ, FBX, and STL are not made for web pages. Most 3D design programs can export GLB from the File menu, so convert before you upload. If you want the model to open in AR on an iPhone or iPad, you also need a second copy in USDZ format. Android phones use the GLB file for AR, so one file covers them.
Size matters more than format. Aim for a GLB under 5 MB, and under 2 MB if you can. Keep textures at 1024 or 2048 pixels on the long side. Turn on mesh compression when you export, since it can cut the file size by half or more. Our guide to the file types the Media Library supports explains how WordPress treats each kind of upload.
Why WordPress Blocks GLB Uploads and How to Allow Them
Try to upload a GLB file to a fresh site and you will see this message: “Sorry, you are not allowed to upload this file type.” This is a safety rule, not a bug. WordPress keeps a short list of file types it trusts, and 3D formats are not on it.
You can add GLB to that list with a few lines of code. Take a full backup first, or test on a staging copy, because a typo in a theme file can take the whole site down. Then add the code to the functions.php file of a child theme, or to a small site plugin. Never edit the parent theme, since the next update will wipe your change. If child themes are new to you, read what a WordPress child theme is first.
add_filter( 'upload_mimes', function ( $types ) {
$types['glb'] = 'model/gltf-binary';
return $types;
} );
Save the file, then go to Media → Add New Media File and upload the model again. If it works, the file shows up in the library with a plain document icon. That icon is normal, since WordPress cannot make a thumbnail for a 3D file. Click the file and copy the address from the File URL box. You will need it in the next step.
If the upload still fails, there are two common causes. First, some servers report a GLB as a generic binary file, and the WordPress file check then rejects it. A file upload plugin made for 3D models handles that check for you. Second, the file may be larger than your upload limit. You can see the limit under Media → Add New Media File, and our guide shows how to increase the upload size in WordPress.
Three Ways to Display a 3D Model on a WordPress Page
There are three routes, and each suits a different kind of site. A plugin is the fastest. The model-viewer tag gives you the most control with no plugin. An embed from a 3D hosting platform keeps the heavy file off your server. Pick the one that fits your skills and your traffic.
Method 1: Use a 3D viewer plugin. Go to Plugins → Add New Plugin and search for “3D model viewer”. Choose one that supports GLB, has recent updates, and is tested with your WordPress version. Most of them add a block to the editor. You open a page, click the plus icon, add the 3D block, and pick your file from the Media Library. Good plugins also allow the GLB upload for you, so you can skip the code above.
Method 2: Use the model-viewer tag in a Custom HTML block. The <model-viewer> tag is an open-source web component. Once its script loads, the browser treats the tag like a built-in element. Download the script file, upload it to your child theme folder, and load it as a module. Then open your page, add a Custom HTML block, and paste the tag below. Swap in your own File URL and write a clear alt text.
<model-viewer src="/wp-content/uploads/2026/11/chair.glb"
alt="Oak dining chair shown in 3D"
camera-controls loading="lazy"
style="width:100%;height:500px">
</model-viewer>
Click Preview in the block toolbar. You will not see the model inside the editor, so open the page on the front end to check it.
Method 3: Embed from a 3D hosting platform. Upload the model to a hosting platform for 3D files, copy the embed code it gives you, and paste it into a Custom HTML block. The embed is an iframe, so the file and the viewer both load from the other service. Your server does less work, but you depend on that service and its branding may show.
How to Add a 3D Model to a WooCommerce Product Page
A 3D view often helps most on a product page, where a buyer wants to check details before paying. WooCommerce does not have a 3D slot in the product gallery, so you have to place the viewer yourself. There are two simple spots that work on any theme.
The first spot is the product description. Go to Products → All Products and open the product. If your viewer plugin gives you a shortcode, paste it into the main description or the short description. The short description sits next to the price, so the model shows near the top. The main description sits in a tab lower down, which keeps the top of the page light.
The second spot is the gallery itself. Some 3D plugins made for WooCommerce can swap the main image for the viewer, or add a “View in 3D” button under the photos. Keep at least one normal photo as the main image. WooCommerce uses that image in shop grids, in the cart, in order emails, and in search results. A model file cannot fill those places.
Test the product page on a phone before you go live. Make sure the page still scrolls when a finger lands on the model. If the viewer traps the scroll, buyers on phones can get stuck above the Add to Cart button.
How to Keep 3D Models Fast and Easy to Use
A 3D model is often the heaviest thing on the page. A 10 MB file can undo months of speed work, and slow pages lose visitors. A few habits keep the weight under control.
Load the model late. Add loading="lazy" to the tag so the file loads only when the viewer scrolls into view. This is the same idea WordPress uses for images, which we cover in how to enable or disable WordPress lazy loading. If the model sits at the very top of the page, skip lazy loading there.
Show a poster image first. Add a poster attribute that points to a small picture of the model. The visitor sees the picture at once, and the 3D file loads behind it. This keeps the layout stable and helps your loading scores. You can read more about those scores in our post on improving Core Web Vitals in WordPress.
Think about every visitor. Write alt text that says what the model is. Keep a normal photo on the page for people who cannot use a 3D view. Avoid auto-rotate on long pages, since constant motion can bother some users and drains battery. Camera controls in the viewer work with arrow keys, so keyboard users can turn the model too.
What to Check When the 3D Model Does Not Show
A blank box where the model should be has a short list of causes. Work through them in order, from the simple checks to the server ones. Most of them take less than a minute each.
Check the file address. Paste the File URL into a new browser tab. If the file downloads, the address is right. If you get a 404 page, the path in your tag is wrong or the file was moved.
Check the browser console. Press F12, open the Console tab, and reload the page. A red line that names your script means the viewer code did not load. A line that mentions CORS means the model sits on another domain that does not allow your site to read it. Host the file on your own domain to avoid that.
Check that the tag survived the save. WordPress strips unknown tags and scripts when a user without the right role saves a post. Open the page as an Administrator and look at the Custom HTML block again. If the tag is gone, add it back from an admin account.
Check the Network tab. In the same F12 panel, open Network and reload. Find the GLB row and look at its size and status. A status of 200 with the full size means the file arrived. In that case the fault is in the model itself, so open it in your 3D program and export it again.
Ready to Add 3D to Your Site?
Showing a 3D model in WordPress comes down to four steps. Export a small GLB file, allow the upload, pick a viewer, and test on a real phone. Start with one model on one page. Watch your page speed, then add more once you are happy with the result.
Keep the safety steps in mind as you go. Back up the site before you change a theme file, and try new plugins on a staging copy first. Keep a normal photo next to every model, so each visitor still sees the product. Check the page again after each WordPress or plugin update.
If you would like a hand with any part of this, our team works on WordPress and WooCommerce sites every day. We can review your setup, look at upload errors, or help you place a viewer on a product page. Reach out to us at 24×7 WP Support and tell us what you are trying to build.
Related posts:

Brian is a WordPress support specialist and content contributor at 24×7 WP Support. He writes practical, easy-to-follow guides on WordPress troubleshooting, WooCommerce issues, plugin and theme errors, website security, migrations, performance optimization, and integrations. With a focus on solving real website problems, Brian helps business owners, bloggers, and online store managers keep their WordPress sites running smoothly.







