side-by-side-images

Aligns two images side by side with equal height in Docusaurus MDX using flexbox and require().

1|Updated Apr 17, 2025
One-click install
npx skills add https://github.com/vendasta/partnercenter-docs --skill side-by-side-images
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: side-by-side-images
Source: https://github.com/vendasta/partnercenter-docs/tree/main/.cursor/skills/side-by-side-images
Command: npx skills add https://github.com/vendasta/partnercenter-docs --skill side-by-side-images

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Placing two images in a single row with matching heights can be tricky when source images have different aspect ratios; this Skill provides a ready-to-use layout approach for consistent visuals in documentation.

Core Features & Use Cases

  • Automatically render two images in a single row with aligned heights in Docusaurus MDX.
  • Supports images located in an img/ folder relative to the doc, or provided paths for flexible documentation layouts.
  • Use Case: Compare two product photos side by side to highlight changes or variations in a tutorial or release notes.

Quick Start

Place two image file paths (e.g., img/part1.png and img/part2.png) and I will render them side by side with equal heights.

Frequently Asked Questions about side-by-side-images

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I align two images side by side with equal heights in Docusaurus?

To align two images side by side with equal heights in Docusaurus, use a responsive flexbox layout within an MDX page. This approach automatically matches image heights across varying aspect ratios using the require() import pattern for consistent documentation visuals.

Why do my side-by-side images in MDX have mismatched heights?

Side-by-side images in MDX have mismatched heights when source files have different aspect ratios and lack a unified container. Applying a flexbox layout with automatic height matching ensures both images render with perfectly aligned heights regardless of their original dimensions.

What is the best way to display paired product photos for comparison in docs?

The best way to display paired product photos for comparison in docs is using a responsive flexbox layout in Docusaurus MDX. This renders both images in a single row with equal heights, clearly highlighting changes or variations for tutorials and release notes.

Can I use the require() import pattern to display side-by-side images in Docusaurus MDX?

Yes, you can use the require() import pattern to display side-by-side images in Docusaurus MDX. This pattern works with a responsive flexbox div to automatically match the heights of two images located in an img/ folder relative to the doc.

Does this side-by-side image layout support images with different aspect ratios?

Yes, this side-by-side image layout supports images with different aspect ratios. It implements a responsive flexbox layout that enables automatic height matching, ensuring both images align perfectly even when their source dimensions vary.

How do I place two images in a single row in Docusaurus MDX?

To place two images in a single row in Docusaurus MDX, provide two image file paths and render them inside a responsive flexbox div. This layout automatically aligns their heights, creating consistent paired visuals for documentation.