Openfilm / Film, tools, darkroom, and visual culture

Live Photos - Bring Your Photos to Life

Introduction to Live Photos feature and how to implement Apple-style dynamic photo effects on your website.

Have you ever admired the Live Photos feature on iPhone? Now, this stunning effect can be implemented on your website or blog!

πŸ“± What are Live Photos?

Live Photos is an innovative feature introduced by Apple on iPhone 6s. When you take a photo, iPhone simultaneously records a 3-second HD video, capturing the moments before and after the shot.

Advantages of Live Photos

  • Dynamic Moments: Capture dynamic scenes that static photos cannot record
  • Audio Memories: Include ambient sounds from the moment
  • Interactive Experience: Users can view dynamic effects with simple gestures
  • Emotional Connection: Make photos more vivid and enhance the viewing experience

🌟 Live Photo Web Component

Now you can add Live Photos functionality to any website using our Live Photo Web Component!

Features

✨ Zero Dependencies β€” Pure vanilla JavaScript, no framework required 🎬 HTML5 Video β€” Uses standard <video> tag, highly compatible 🌍 Universal β€” Works with WordPress, Astro, React, Vue, plain HTML πŸ“± Touch-Friendly β€” Long-press on mobile, hover on desktop πŸ’¬ WeChat Compatible β€” Tap-to-play support in WeChat browser πŸ“³ Haptic Feedback β€” Supports device vibration πŸ“ Auto Aspect Ratio β€” Automatically detects photo dimensions β™Ώ Accessible β€” Keyboard navigation and screen reader support ⚑ Optional Autoplay β€” Auto-play when entering viewport (configurable) 🎯 LIVE Icon Animation β€” Rotating icon when video plays (similar to Apple Live Photos)

πŸš€ Quick Start

Installation

# Install via npm
npm install live-photo-component

Or via CDN:

<script src="https://unpkg.com/live-photo-component/dist/live-photo.umd.js"></script>
<link rel="stylesheet" href="https://unpkg.com/live-photo-component/dist/styles.css">

Basic Usage

<live-photo
  photo="photo.jpg"
  video="video.mp4">
</live-photo>

Full Configuration

<live-photo
  photo="photo.jpg"
  video="video.mp4"
  width="600"
  muted
  autoplay
  radius="12"
  loop>
</live-photo>

🎨 Live Demos

Example 1: Sunset

A warm evening scene captured with a mobile device.

How to interact:

  • πŸ–₯️ Desktop: Hover over the LIVE badge
  • πŸ“± Mobile: Long-press the image to see the dynamic effect

Example 2: Campus

An ordinary moment on campus, brought to life by Live Photos.


Example 3: Behind the Scenes (with sound)

McDonald’s photoshoot behind the scenes, with sound enabled to feel the pressure from McDonald’s.

πŸ”§ Configuration Options

AttributeTypeDefaultDescription
photostringrequiredCover image URL
videostringrequiredVideo URL
widthnumber/string600Max width (pixels or percentage)
mutedbooleantrueMute audio
autoplaybooleanfalseAuto-play when entering viewport
radiusnumber8Border radius (pixels)
loopbooleanfalseLoop video playback

πŸ’‘ Best Practices

1. Match Photo and Video Aspect Ratio

Ensure the cover image and video have the same aspect ratio for smooth transitions.

2. Keep Videos Short

Live Photos are typically 1-3 seconds. Longer videos affect user experience and loading speed.

3. Compress Videos

Use MP4 (H.264) format to significantly reduce file size and improve loading speed.

4. Use HTTPS

Ensure both images and videos use HTTPS protocol to avoid mixed content issues.

5. Provide Fallback

The component displays the cover image when video fails to load, ensuring users always see content.

🎯 LIVE Icon Animation

One of the core features of Live Photos is the LIVE icon animation:

  • Icon Rotation: The LIVE icon rotates 360Β° every 5 seconds during playback
  • Smooth Transition: Video fades in while cover image fades out
  • Visual Feedback: Clear indication that Live Photo is playing

This animation effect is identical to Apple’s Live Photos, providing users with a familiar interactive experience.

🌐 Browser Compatibility

BrowserVersion
Chrome60+
Firefox60+
Safari11+
Edge79+
WeChat BrowserAll versions
iOS Safari11+
Android Chrome60+

πŸŽ‰ Conclusion

Live Photos make your website more dynamic and engaging. Whether showcasing travel photos, documenting life moments, or creating artistic photography, Live Photo adds unique charm to your work.

Start using it now and bring your photos to life!


If you have any questions or suggestions, feel free to open an issue on GitHub!


🌐 Language / 语言

English Version | δΈ­ζ–‡η‰ˆ


If you have any questions or suggestions, feel free to open an issue on GitHub!


Want to use this on your own site? Get the Live Photo component and WordPress plugin.

Want to publish Live Photos on your own site? Read the website guide.