add file download function for images