Share a 360° panorama as a link people can look around
Put a 360° photo inside one HTML file with the Pannellum viewer, upload it and send a link. The reader drags to look around in the browser with no app.
A 360° photo sent as an attachment opens as a flat, stretched image in most photo apps and email clients. The reader sees a long strip instead of a room.
Pannellum is an open-source panorama viewer that draws the photo with WebGL. Put it and the photo in one HTML file, host the file at a link, and the reader drags or swipes to look around and scrolls or pinches to zoom.
Step 1: get an equirectangular image
Pannellum reads equirectangular images: a JPEG twice as wide as it is tall that covers the full sphere.
- ✓360° cameras export this format from their phone or desktop app; pick the stitched JPEG, not the raw dual-lens file.
- ✓A phone panorama mode photo covers less than the full sphere. Pannellum can show it with the haov and vaov settings, which give its horizontal and vertical angle in degrees.
- ✓Each device limits how wide an image WebGL can draw. When a photo is too wide, Pannellum shows an error that names the device limit instead of the scene. Resizing to 4096 pixels wide keeps the photo under that limit on most current phones; open the link on a phone before you send it.
Step 2: build the HTML file
Create panorama.html with these parts:
- ✓<!doctype html>, <meta charset="utf-8"> and <meta name="viewport" content="width=device-width, initial-scale=1"> in the head.
- ✓In the head: <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pannellum@2.5.7/build/pannellum.css"> and <script src="https://cdn.jsdelivr.net/npm/pannellum@2.5.7/build/pannellum.js"></script>
- ✓In the body: <div id="panorama" style="width:100%;height:100vh"></div>
- ✓After it: <script>pannellum.viewer('panorama', { type: 'equirectangular', panorama: 'data:image/jpeg;base64,...', autoLoad: true });</script>
- ✓For the panorama value, base64-encode the JPEG. On macOS or Linux, base64 -i photo.jpg | tr -d '\n' prints it on one line; paste it after the comma.
- ✓Tested with Pannellum 2.5.7 in Chrome: an equirectangular JPEG inlined this way fired the load event and drew the scene with zoom and full-screen controls.
Options worth setting
Add these to the object passed to pannellum.viewer:
- ✓autoRotate: -2 turns the view slowly until the reader touches it.
- ✓yaw and pitch set the starting direction, in degrees, so the page opens on the part of the scene that matters.
- ✓hotSpots adds labelled markers, for example { pitch: -5, yaw: 40, type: 'info', text: 'Kitchen' }.
- ✓title and author show in a small box in the corner of the viewer.
File size
Base64 makes the photo about a third larger than the JPEG. Keep the JPEG at 4096 by 2048 or smaller and save it at around 80% quality to keep the page small.
Upload it and send the link
Drag panorama.html onto the FileShare Pro dashboard and copy the link. Viewers need no account and no app.
Turn on comments and reviewers can leave a note on the page after typing a name. When the photo changes, upload the new file over the old one; the link stays the same: updating a shared link without changing it.
Related: a 3D model as a link, a saved web page as a link and making an HTML file self-contained.
Frequently asked
Embed the equirectangular JPEG in one HTML file with the Pannellum viewer, upload the file and send the link. It opens in the browser.
No. Pannellum draws the panorama with WebGL in a current browser on desktop or phone; viewers drag or swipe to look around.
Yes. Pannellum hot spots place text markers at a pitch and yaw in the scene.
Yes. The free plan hosts up to 50 files of up to 100 MB each, with view counts and comments included. Password-protected links are on Pro.
Drop the file, copy the link — live in seconds, free plan included.
Start sharing free