ThumbHash
Version 2.0.4
June 30, 2026
Added
- Added explicit
srcsetrendering support for responsive<picture>elements where each<source>/fallback<img>uses its own asset hash via childdata-thumbhashattributes. - Added JavaScript decoder coverage for
srcsetrendering, child-specific aspect ratios, dynamic DOM insertion, invalid child hashes, and compatibility with existing sharedpicturebehavior.
Changed
- Refactored the client decoder around render roots so
srcsetpicture parents coordinate child hashes without treating those children as standalone background placeholders.
Fixed
- Isolated invalid
srcsetchild hashes so one bad child placeholder does not prevent valid sibling placeholders from rendering. - Preserved existing shared
picturebehavior for child elements that provide their owndata-thumbhashrender settings.
Version 2.0.2
April 9, 2026
Added
- PHP unit and integration test suites (Codeception).
- JavaScript decoder test suite (Vitest).
- Static analysis passing at PHPStan level 7.
Version 2.0.1
April 6, 2026
Fixed
- Fixed CRC32 and Adler32 checksum calculations in the client-side PNG encoder for improved data integrity. Replaced the fragile nibble-based inline CRC and interleaved Adler32 with standard full-table CRC32 and a dedicated Adler32 pass over a pre-built scanline buffer.
Version 2.0.0
April 4, 2026
Breaking Changes
data-thumbhash-bgis no longer supported.- Background placeholders must now use
data-thumbhashwithdata-thumbhash-render="bg". - The client decoder now supports explicit render modes (
bg,picture,img) and defaults tobgunless overridden.
Added
- New Twig helper:
thumbhashTransparentSvg(width = 4, height = 4). - New setting:
renderMethod(bg,picture,img). - New setting:
scriptPosition(head,end). - Picture placeholder propagation support for
<picture data-thumbhash ...>wrappers. - Introduced ratio cropped PNG placeholders for better aspect ratio handling and reduced layout shift for both the frontend JS decoder and backend generated data URLs.
Changed
- Inline decoder config now includes
renderMethod. - Background placeholder behavior is now tied to the
bgrender mode instead of a dedicateddata-thumbhash-bgattribute.
Upgrade Guide
- Replace all
data-thumbhash-bg="..."usages withdata-thumbhash="..." data-thumbhash-render="bg". - If your implementation depends on setting
<img src>from the hash, setdata-thumbhash-render="img"per element, or set'renderMethod' => 'img'globally. - No database or migration changes are included in this release.
schemaVersionremains1.0.0.
Version 1.0.0
March 30, 2026
- Initial release