| 开发者 | pratiklondhe |
|---|---|
| 更新时间 | 2026年11月2日 03:14 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
.glb must really be a binary glTF 2.0 file, an .stl must really be an STL, and text files that carry PHP or a script tag are refused. When a file is refused, you are told why.
STL and OBJ are converted for you
STL files (from 3D printing and CAD) and OBJ files are converted to GLB when you upload them. The conversion streams the file, so large models do not run the server out of memory. STL files are turned upright and scaled from millimetres, so they look right straight away. The original file is kept.
The 3D Model block
<model-viewer>, bundled with the plugin together with its decoders for compressed models. Nothing is loaded from a CDN, and the viewer only loads on pages that show a 3D model.
For developers
Filters and actions for every default, limit and message, JavaScript hooks in the editor, wp pratiks-3d-model-embedder WP-CLI commands, REST routes, and Abilities API abilities (WordPress 6.9+) so AI agents can list models, convert them and set posters. See the reference.
Free and open source under the GPL. No pro version, no upsells, no ads in wp-admin, no tracking.
GLB (recommended), glTF with everything embedded, STL and OBJ. STL and OBJ are converted to GLB at upload. USDZ can be uploaded too, as the iPhone and iPad version of a model for augmented reality.
glTF files often come with separate files (a .bin file and texture images) that cannot be uploaded together with them. Export the model as a single .glb file from your 3D tool (Blender: File > Export > glTF 2.0, format "glTF Binary") and upload that.
OBJ colours and textures live in separate .mtl and image files, which cannot come along with a single upload, so converted OBJ and STL models get a neutral grey. For colours and textures, upload a GLB.
Files over 64 MB are not converted during the upload, to keep uploads fast. The block tells you so. Ask whoever manages the server to run wp pratiks-3d-model-embedder convert <attachment ID> --ignore-limit, or raise the limit with the pratiks_3d_model_embedder_max_convert_bytes filter.
Everyone who can upload images (the upload_files capability). To limit 3D uploads to administrators: add_filter( 'pratiks_3d_model_embedder_upload_capability', fn() => 'manage_options' );
Yes. On a network, add glb gltf usdz stl obj to Upload file types in Network Admin > Settings. Tools > Site Health tells you when they are missing.
iPhones and iPads need a USDZ version of the model (choose it in the block's Augmented reality panel), and your server must send USDZ files as model/vnd.usdz+zip. Tools > Site Health checks this.