Skip to content

🎥 Make videos programmatically with React

document

Jonny Burger3300ff402bab
diff --git a/packages/docs/docs/img.md b/packages/docs/docs/img.md
index 9108ddd920..a4b2dfb0e2 100644
--- a/packages/docs/docs/img.md
+++ b/packages/docs/docs/img.md
@@ -66,7 +66,7 @@ If an error occurs, the component must be unmounted or the `src` must be replace
From `v3.3.82`, the image load will first be retried before `onError` is thrown.
-## `maxRetries` <AvailableFrom v="v3.3.82"/>
+### `maxRetries` <AvailableFrom v="3.3.82"/>
If an image fails to load, it will be retried from `v3.3.82`. The default value is `2`.
An exponential backoff is being used, with 1000ms delay between the first and second attempt, then 2000ms, then 4000ms and so on.
@@ -79,6 +79,14 @@ Remotion inherits the props of the regular `<img>` tag, like for example `style`
Don't use the `<Img>` tag for GIFs, use [`@remotion/gif`](/docs/gif) instead.
+## Error behavior
+
+From v4.0.0: If the image fails to load and no retries are left, then [`cancelRender`](/docs/cancel-render) will be called to throw an error, unless you handle the error using `onError()`.
+
+From v3.3.82: If an image fails to load, it will be retried up to two times.
+
+In earlier versions, failing to load an image would lead to an error message in the console and an eventual timeout.
+
## Restrictions
- The maximum resolution that Chrome can display is `2^29` pixels (539 megapixels) <sup><a href="https://stackoverflow.com/questions/57223559/what-is-the-maximum-image-dimensions-supported-in-desktop-chrome#:~:text=than%202%5E29-,(539MP)">[source]</a></sup>. Remotion inherits this restriction.
diff --git a/packages/docs/src/components/AvailableFrom.tsx b/packages/docs/src/components/AvailableFrom.tsx
index 2ef9667d16..0ee0291f80 100644
--- a/packages/docs/src/components/AvailableFrom.tsx
+++ b/packages/docs/src/components/AvailableFrom.tsx
@@ -24,6 +24,10 @@ export const AvailableFrom: React.FC<{
throw new Error("v is required");
}
+ if (v.startsWith("v")) {
+ throw new Error("do not include v");
+ }
+
return (
<a
target={"_blank"}