Export layer(s) raster extents

Exporting layer(s) uses the page size as the size of the raster. Need an option to only use the extents of the layer(s). E.g. if I export objects on a layer that the extents are within a 32x32px boundary, the PNG should be 32x32 and not the size of the page. Probably people would want both options, with a checkbox for ‘layer extents’