ThumbHash
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