Sirv media viewer

From hashgraph-online/awesome-codex-plugins · View interactive version

Sirv media viewer is an AI agent skill from the GitHub repository hashgraph-online/awesome-codex-plugins. Sirv Media Viewer guidance. Use when building, auditing, or debugging Sirv product galleries, zoom viewers, 360 spins, videos, YouTube/Vimeo embeds, 3D models, PDF galleries, smart .view galleries, thumbnails, fullscreen/mobile behavior, SMV class="Sirv" markup, data-src/data-options/data-breakpoint

How to use this skill

Skill file

Sirv Media Viewer

Sirv Media Viewer (SMV) is the right path when the user needs interactive product media rather than just a transformed image URL. It handles galleries, thumbnails, zoom, spins, video, 3D models, smart galleries, fullscreen, lazy loading, and responsive behavior.

Official Sources First

Check current Sirv docs before changing option names, module names, event/API calls, or CSP rules:

Read implementation.md when writing or reviewing viewer markup, script loading, options, breakpoints, smart galleries, API/events, or CSP.

For creating the spin assets themselves (frame naming, .spin generation, spin options, video-to-spin), use ../sirv-360-spin/SKILL.md; for video encoding/streaming strategy outside the viewer, ../video-optimization/SKILL.md.

Default Workflow

  1. Identify the media set: zoomable images, static images, .spin, video, YouTube/Vimeo, .glb/.gltf, PDF gallery, or .view smart gallery.
  2. Choose the viewer shape: single item, explicit child-item gallery, single-div comma-separated gallery, smart .view gallery, grid, or slider.
  3. Load Sirv JS once, ideally in the document head for important above-fold viewers. Use a module-limited Sirv JS URL only after checking the current docs and required media modules.
  4. Use SMV markup: a class="Sirv" container with child div data-src assets, or a single div class="Sirv" data-src="...">.
  5. Put viewer behavior in data-options, SirvOptions.viewer, or data-breakpoints; put image transforms in Sirv Dynamic Imaging URLs/profiles.
  6. For above-fold/LCP-relevant viewers, avoid default lazy delays by using autostart:created, preconnect to Sirv domains, and reserve stable layout space.
  7. Provide meaningful data-alt or Sirv file descriptions. Keep ARIA labels intentional when customizing a11y prompts.
  8. Verify in a real browser: first asset load, thumbnail navigation, fullscreen, zoom, spin drag, video/model controls, mobile behavior, keyboard/focus, network requests, LCP, and CLS.

Core Patterns

Mixed Product Gallery

<link rel="preconnect" href="https://scripts.sirv.com" crossorigin>
<link rel="preconnect" href="https://account.sirv.com" crossorigin>
<script src="https://scripts.sirv.com/sirvjs/v3/sirv.js"></script>

<div class="Sirv" data-options="autostart:created; layout.aspectRatio:1/1; thumbnails.position:bottom">
  <div data-src="https://account.sirv.com/products/sku-123-front.jpg" data-type="zoom" data-alt="SKU 123 front view"></div>
  <div data-src="https://account.sirv.com/products/sku-123-side.jpg" data-type="zoom" data-alt="SKU 123 side view"></div>
  <div data-src="https://account.sirv.com/products/sku-123.spin" data-alt="SKU 123 360 spin"></div>
  <div data-src="https://account.sirv.com/products/sku-123-demo.mp4" data-options="autoplay:false" data-alt="SKU 123 demo video"></div>
</div>

Smart Gallery

<script src="https://scripts.sirv.com/sirvjs/v3/sirv.js"></script>
<div
  class="Sirv"
  data-src="https://account.sirv.com/products/sku-123.view"
  data-options="itemsOrder:spin, zoom, video, model, image; fullscreen.enable:true"
></div>

Single-Div Gallery

<div
  class="Sirv"
  data-src="https://account.sirv.com/products/sku-123.spin, https://account.sirv.com/products/sku-123-front.jpg, https://account.sirv.com/products/sku-123-demo.mp4"
  data-options="layout.type:slider; thumbnails.type:square"
></div>

Option Boundaries

Red Flags

Verification

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.