# Website Photos & Video: Sizes, Galleries, Lazy Video

> Automated media optimization pipeline for high-performance web galleries, responsive images, and lazy-loaded video.

Website Photos & Video: Sizes, Galleries, Lazy Video is a free AI agent skill on Agensi by Siyakha Digital by Thebe Ramathebane, in Workflow Automation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Siyakha Digital by Thebe Ramathebane](https://www.agensi.io/creators/thebe-ramathebane)
- Category: [Workflow Automation](https://www.agensi.io/skills/workflow-automation)
- Version: 1.0
- Last updated: 2026-11-29
- Security: scan passed (2026-11-29); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/website-photos-video-sizes-galleries-lazy-video
- Tags: automation, web-design, performance, ffmpeg, webp

## About this skill

Websites slow down when owners upload raw smartphone media. This skill provides a systematic pipeline for optimizing high-resolution photos and videos into performant web assets without losing visual quality.

### What it does
- **Multi-size generation** produces optimized `.webp` variants at 1600px and 800px widths to ensure fast loading on mobile devices.
- **Smart cropping** handles portrait-orientation hero images for mobile by centering on subjects and removes unsightly camera date stamps or watermarks.
- **Video compression** re-encodes MP4s to manageable bitrates (approx. 850 kbps) and generates high-quality poster frames to prevent layout shift.
- **Lazy loading orchestration** implements a "load on play" strategy for videos and deferred loading for images below the fold to save user bandwidth.
- **Interactive galleries** builds accessible slideshows, "Show More" expansion logic, and `<dialog>`-based lightboxes with keyboard navigation.

### How it works
1. **File analysis** runs `sips` or `identify` to inspect dimensions, metadata, and visual content like logos or faces.
2. **Asset processing** executes shell and Swift scripts to batch convert images to WebP and re-encode video at target bitrates.
3. **Component integration** writes HTML/CSS for responsive galleries, ensuring hero images use `<source>` tags for art direction.
4. **Cleanup** identifies and removes orphaned media files that are no longer referenced in the site content.

### Frameworks & tools
The pipeline utilizes `sips`, `imagemagick` (identify), `ffmpeg`, and a custom Swift-based encoder. Frontend output relies on semantic HTML5, native `<dialog>` elements, and vanilla JavaScript for focus management and lazy loading.

### Why this beats prompting it yourself
Standard LLMs often suggest heavy libraries or generic compression that ruins visual clarity. This skill enforces specific bitrate targets and complex accessibility patterns, like focus management in lightboxes, that manual prompts frequently overlook.

### Use cases
- Optimizing 3MB WhatsApp photos for a fast-loading event gallery.
- Creating a mobile-first hero section with art-directed portrait crops.
- Embedding video testimonials that don't destroy Lighthouse performance scores.
- Managing large portfolios with "Show More" pagination and full-screen viewers.

### Known limitations
Requires macOS for `sips` and `swiftc` components. Video re-encoding requires `ffmpeg` for non-macOS environments.

## Requires

- Optional: macOS or ImageMagick
- Optional: FFmpeg

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Website Photos & Video: Sizes, Galleries, Lazy Video skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill improve website performance compared to standard image resizing?

This skill automates the conversion of raw media into high-performance web formats, specifically handling WebP generation, smart cropping for mobile responsiveness, and bitrate-optimized video compression to boost site speed and SEO.

### Does this skill help manage storage by removing unused assets?

Yes, the pipeline includes a 'cleanup' phase that scans your project to identify and remove orphaned media files that are no longer referenced in your HTML, keeping your storage footprint lean.

### How does the skill ensure that media quality isn't lost during the compression process?

The skill uses intelligent analysis to center on subjects during portrait cropping and enforces specific bitrate targets (approx. 850 kbps for video) to ensure a perfect balance between file size and visual clarity.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
