Project portfolio Browse selected work

Shopify Plus Upgrade Monthly Fee Reduction + Up to $4800 Development Fee Credit - Exclusive WesWoo Offer

Developer modules / Product detail and combined purchases

Product detail and combined purchases

Synchronize model and variant facts before media, accessories and specifications.

Thumbnails, main media and video

Render actual media first. When adding thumbnails, preserve the relationship between selected media and variant. Keep important diagram facts in HTML and avoid blocking buying content with video.

Data and dependencies

  • product.media and media_type.
  • Use descriptive alt text from the model media record.

Interaction logic

  • Keep images readable and video user-controlled.
  • Select variant media when available and retain a missing-image fallback.
Example code · snippets/ww-media.liquid
Liquid · WESWOO
<ol aria-label="Product media">
  {% for media in product.media %}
    <li id="Media-{{ section.id }}-{{ media.id }}">
      {% case media.media_type %}
        {% when 'image' %}
          {{ media | image_url: width: 1400 | image_tag: widths: '480, 800, 1400', sizes: '(max-width: 749px) 100vw, 60vw', loading: 'lazy' }}
        {% when 'video' %}
          {{ media | video_tag: controls: true, autoplay: false, preload: 'none' }}
        {% else %}
          <a href="{{ product.url | escape }}">View media on the product page</a>
      {% endcase %}
    </li>
  {% endfor %}
</ol>

Acceptance checks

  • Check selected thumbnails, keyboard, touch and main media.
  • Do not defer the first-view image; defer lower media when appropriate.

The example is a media-list fragment. Use eager loading for first-view media and integrate the existing gallery for carousel and focus behavior.

Read it, integrate it, verify it

  1. Choose a module and confirm the data contract.
  2. Connect the fragment to the current theme or framework.
  3. Check real variants, markets and recovery states.

Examples target Shopify Online Store 2.0 themes. Headless has separate data and version boundaries. Integrate fragments with actual fields, theme components and locale files.

Architecture references

Original educational examples with Shopify documentation and pinned upstream references. Follow the applicable license when adopting repository code.

Shopify/dawn · Licensecommit 3e9ee2281dc4 · Shopify-integration theme license; architecture reference without copying the implementation.
Shopify/hydrogen · Licensecommit 9e358a2462ba · MIT; retain copyright and license when using substantial code.

References checked 2026-11-12