Resizing images in document filters