Releases: datocms/react-datocms
v8.1.0
- stega: add dedicated react-datocms/stega subpath f422829
v8.0.6 — default video poster to thumbnailUrl
- VideoPlayer: default poster to data.thumbnailUrl a65dccd
v8.0.5 — automatic sizes="auto"
Automatic sizes="auto" for lazy-loaded responsive images
When you don't pass an explicit sizes prop (and the image isn't priority), the image components now emit sizes="auto, 100vw" together with loading="lazy".
On supporting browsers (Chrome/Edge 126+, Opera, Samsung Internet, Firefox 150+) the browser picks the optimal srcset candidate from the image's real laid-out width instead of assuming the full viewport width (100vw) — often a much smaller download. Browsers without support (e.g. Safari) fall back to 100vw, i.e. the previous behavior, so there is no regression.
- An explicit
sizes(prop, or coming from theresponsiveImageGraphQL query) still takes precedence — we never override it. priorityimages are unchanged (they load eagerly, andsizes="auto"requiresloading="lazy").- Applies to both the SSR/native components and the JavaScript lazy-loading components.
v8.0.4 — stega utils moved out of the use-client hook (⚠️ subpath export change)
⚠️ Breaking change for react-datocms/use-content-link imports
This release fixes a bug where stripStega/decodeStega/revealStega couldn't run in React Server / backend components: they were being re-exported from a 'use client' hook, which tainted them as client-only.
As part of the fix, these utilities were moved out of the react-datocms/use-content-link subpath and are now re-exported only from the package barrel (react-datocms):
// ❌ No longer works as of 8.0.4 (worked in 8.0.3)
import { stripStega } from 'react-datocms/use-content-link';
// error TS2305: Module '"react-datocms/use-content-link"' has no exported member 'stripStega'
// ✅ From the barrel
import { stripStega } from 'react-datocms';
// ✅ Recommended for client components that want to avoid pulling in
// the rest of the barrel (e.g. @mux / VideoPlayer): import the pure,
// dependency-free stega utils straight from the underlying package
import { stripStega } from '@datocms/content-link/stega';The react-datocms/use-content-link subpath now exposes only the useContentLink hook (and a stripStega: boolean option on UseContentLinkOptions, which is unrelated to the removed function).
We acknowledge this should ideally have been a major version bump — apologies for shipping it under a patch. If you adopted the "Responsive Images — automatic sizes" update (which prompts upgrading react-datocms), this is the change that may have touched your stega imports.
v8.0.3
v8.0.1
- Upgrade @datocms/content-link to 0.3.19 and expose hue prop b641d25
Full Changelog: v8.0.0...v8.0.1
v8.0.0
Breaking change: @mux/mux-player-react is now an optional peer dependency
Previously, react-datocms bundled @mux/mux-player-react as a direct dependency with a "*" version range. This caused issues where package managers could resolve to outdated versions of the Mux player, leading to subtitles/closed captions not loading on Chrome.
Starting with v8.0.0, @mux/mux-player-react is declared as an optional peer dependency.
How to upgrade
If you use <VideoPlayer />, add @mux/mux-player-react to your project's dependencies:
npm install @mux/mux-player-reactWe recommend version 3.11.4 or later, which includes the Chrome subtitles fix.
If you don't use <VideoPlayer />, no action is needed — the Mux player package will no longer be pulled into your bundle at all.
Why this change?
- Fixes subtitles not loading on Chrome (forum thread)
- Gives you control over which Mux player version you use
- Reduces bundle size for projects that don't use
<VideoPlayer />
v7.2.10
v7.2.9
- Allow enableClickToEdit prop to accept false value 998b67e