~M•29
Published on

Issue 03 - Unable to load MDX inline images

Authors
  • avatar
    Name
    MDolce
    Twitter
Table of Contents

Error we need to solve:

Unable to load MDX inline images

Assumptions: There are two ways to load inline MDX images:

---
title: Displaying Images in MDX
date: 2023-02-15
tags:
  - docs
workflow: "docs"
draft: false
layout: PostSimple
images:
  - /static/images/backdrop-2.webp
summary: Example of displaying images in MDX, using Next images and a custom layout grid.
---
<div className="-mx-2 flex flex-wrap overflow-hidden xl:-mx-2">
  <div className="my-1 w-full overflow-hidden px-2 xl:my-1 xl:w-1/2 xl:px-2">
    ![Image one](https://picsum.photos/800/400?random=1)
  </div>
  <div className="my-1 w-full overflow-hidden px-2 xl:my-1 xl:w-1/2 xl:px-2">
    ![Image two](https://picsum.photos/800/400?random=2)
  </div>
  <div className="my-1 w-full overflow-hidden px-2 xl:my-1 xl:w-1/2 xl:px-2">
    ![Image three](https://picsum.photos/800/400?random=3)
  </div>
  <div className="my-1 w-full overflow-hidden px-2 xl:my-1 xl:w-1/2 xl:px-2">
    ![Image four](https://picsum.photos/800/400?random=4)
  </div>
</div>

What we did

Added an image to a table

Images did not appear

Tailwind CSS Grid SystemNot Mapped ComponentUpdating Tailwind ConfigOutcome
20240126160944-tailwindcss-grid-gen.jpg20240126174716-sample-grid-nomap.jpg

Solution?

TBD

REF(s):

TBD