---
title: v0.31.1 - 29th September 2022
slug: changelog/v0.31.1
---

* Upgrade to libvips v8.13.2 for upstream bug fixes.

* Ensure `close` event occurs after `end` event for Stream-based output.
  [#3313](https://github.com/lovell/sharp/issues/3313)

* Ensure `limitInputPixels` constructor option uses uint64.
  [#3349](https://github.com/lovell/sharp/pull/3349)
  [@marcosc90](https://github.com/marcosc90)

* Ensure auto-rotation works with shrink-on-load and extract (regression in 0.31.0).
  [#3352](https://github.com/lovell/sharp/issues/3352)

* Ensure AVIF output is always 8-bit.
  [#3358](https://github.com/lovell/sharp/issues/3358)

* Ensure greyscale images can be trimmed (regression in 0.31.0).
  [#3386](https://github.com/lovell/sharp/issues/3386)
