attempt to generate downsampled preview, but not working