You may wonder if students can view the images uploaded to a quiz from Files. A short answer is that if Files is disabled in your course, students cannot access the images from Files, but only view them when they take the quiz. But if Files is enabled in your course, please continue to read.
The images uploaded to Canvas quizzes are saved in folder “Uploaded Media” in Files. The folder is published by default. So students can view the images from Files. To make the images only viewable in quizzes, you can change the permission for the “Uploaded Media” folder to “Only available to students with link”.
You can also restrict the view access to the images to a certain period of time, and match the time with the availability of a quiz. For example, if a quiz is available from 1 PM 7th May to 1 PM 8th May, you can schedule the same availability for the image in Files.