images.mdx 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. ---
  2. title: "Images and embeds"
  3. description: "Add image, video, and other HTML elements"
  4. icon: "image"
  5. ---
  6. <img style={{ borderRadius: "0.5rem" }} src="https://mintlify-assets.b-cdn.net/bigbend.jpg" />
  7. ## Image
  8. ### Using Markdown
  9. The [markdown syntax](https://www.markdownguide.org/basic-syntax/#images) lets you add images using the following code
  10. ```md
  11. ![title](/path/image.jpg)
  12. ```
  13. Note that the image file size must be less than 5MB. Otherwise, we recommend hosting on a service like [Cloudinary](https://cloudinary.com/) or [S3](https://aws.amazon.com/s3/). You can then use that URL and embed.
  14. ### Using embeds
  15. To get more customizability with images, you can also use [embeds](/writing-content/embed) to add images
  16. ```html
  17. <img height="200" src="/path/image.jpg" />
  18. ```
  19. ## Embeds and HTML elements
  20. <iframe
  21. width="560"
  22. height="315"
  23. src="https://www.youtube.com/embed/4KzFe50RQkQ"
  24. title="YouTube video player"
  25. frameBorder="0"
  26. allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
  27. allowFullScreen
  28. style={{ width: "100%", borderRadius: "0.5rem" }}
  29. ></iframe>
  30. <br />
  31. <Tip>
  32. Mintlify supports [HTML tags in Markdown](https://www.markdownguide.org/basic-syntax/#html). This is helpful if you prefer HTML tags to Markdown syntax, and lets you create documentation with infinite flexibility.
  33. </Tip>
  34. ### iFrames
  35. Loads another HTML page within the document. Most commonly used for embedding videos.
  36. ```html
  37. <iframe src="https://www.youtube.com/embed/4KzFe50RQkQ"> </iframe>
  38. ```