3

I'm developing the Gatsby static site, so I want to use MDX for creating pages about completed projects. Is there a difference between using standard syntax for MDX in Gatsby:

![alt](path/to/image)

and using ordinary tags:

<img src="path/to/image" alt="alt" />

Does "gatsby-remark-images" process images imported with a regular img tag or it understand only method from docs?

I ask because I need to style images, and when I code like example below I got big nesting construction.

<figure>

![alt](path/to/image)

</figure>

Code with regular img tag more simple, it doesn't contain p, span etc.

<figure>
  <img src="../images/test-work-img3.jpg" alt="alt text for small image" />
  <figcaption>Caption text for small image</figcaption>
</figure>

Thanks!

vldmrrdjcc
  • 2,082
  • 5
  • 22
  • 41
andrewnosov
  • 374
  • 4
  • 14

0 Answers0