Write thumbnail and image to filesystem