Skip to content

🎥 Make videos programmatically with React

Docs: Improve page about preferring native tags

Jonny Burgercc0e3e9d8d80
diff --git a/packages/docs/docs/use-img-and-iframe.md b/packages/docs/docs/use-img-and-iframe.md
index a561b56ffe..5e9f6463b3 100644
--- a/packages/docs/docs/use-img-and-iframe.md
+++ b/packages/docs/docs/use-img-and-iframe.md
@@ -1,8 +1,18 @@
---
image: /generated/articles-docs-use-img-and-iframe.png
id: use-img-and-iframe
-title: <Img> and <IFrame> tags
+title: <Img>, <Video> and <Audio>
crumb: "Best practices"
---
-Prefer Remotions [`<Img />`](/docs/img) and [`<IFrame />`](/docs/iframe) Tags over the native HTML elements. This will ensure that rendering is paused until all resources are actually loaded. The last thing you would want is your video to have a flickering frame!
+**Prefer [`<Img />`](/docs/img) or [`<Gif />`](/docs/gif)** over the native `<img>` tag, `<Image>` from Next.js and CSS `background-image`.
+**Prefer [`<OffthreadVideo />`](/docs/offthreadvideo) or [`<Video />`](/docs/video)** over the native `<video>` tag.
+**Prefer [`<Audio />`](/docs/audio)** over the native `<audio>` tag.
+**Prefer [`<IFrame />`](/docs/iframe)** over the native `<iframe>` tag.
+
+<br/>
+
+By using the components by Remotion, it will be ensured that:
+
+<Step>1</Step> The assets are fully loaded before the the frame is rendered<br/>
+<Step>2</Step> The images and videos are synchronized with Remotion's timeline.
diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.ts
index 3e2ef06b73..cbf9f9cff7 100644
--- a/packages/docs/src/data/articles.ts
+++ b/packages/docs/src/data/articles.ts
@@ -2635,7 +2635,7 @@ export const articles = [
},
{
id: "use-img-and-iframe",
- title: "<Img> and <IFrame> tags",
+ title: "<Img>, <Video> and <Audio>",
relativePath: "docs/use-img-and-iframe.md",
compId: "articles-docs-use-img-and-iframe",
crumb: "Best practices",
diff --git a/packages/docs/static/generated/articles-docs-use-img-and-iframe.png b/packages/docs/static/generated/articles-docs-use-img-and-iframe.png
index ee1f8eb844..7cf40ccc87 100644
Binary files a/packages/docs/static/generated/articles-docs-use-img-and-iframe.png and b/packages/docs/static/generated/articles-docs-use-img-and-iframe.png differ