When one uploads a file to moodle via it's interface, let's say it's an image ... called 'thanks.png' ... the file isn't stored by a humanly recognizable file name ... like thanks.png .. but as meta data in mdl_files table:
in that table there is a column for contenthash ...
Looks like:
ca22ce3d03bda9c6b25ed15b58701226dd52b0c8
That becomes the file when stored in moodledata/filedir/
It is located in moodledata/filedir/ca/22/ca22ce3d03bda9c6b25ed15b58701226dd52b0c8
The meta data in mdl_files table associated with that row of info for a file has a column for filename and in that column one sees the real name of the file: thanks.png
There is also a column in the mdl_files table for that row for mimetype. The above example has "image/png" for the 'thanks.png' file. That info is needed by browsers so any browser knows what to do with the file.
Here's what a direct mysql query looks like for the 'thanks.png' graphic file to locate it in the DB:
mysql> select contenthash,filename,mimetype,component from mdl_files where filename = 'thanks.png';
+------------------------------------------+------------+-----------+--------------+
| contenthash | filename | mimetype | component |
+------------------------------------------+------------+-----------+--------------+
| ca22ce3d03bda9c6b25ed15b58701226dd52b0c8 | thanks.png | image/png | mod_resource |
from the server via ssh and located in moodledata/filedir/ a find ...
[root@sos filedir]# find ./ -name ca22ce3d03bda9c6b25ed15b58701226dd52b0c8
./ca/22/ca22ce3d03bda9c6b25ed15b58701226dd52b0c8
One can see the contenthash as in db is the filename as stored on server.
and using another command to check file type:
[root@sos filedir]# file -b ./ca/22/ca22ce3d03bda9c6b25ed15b58701226dd52b0c8
PNG image data, 426 x 294, 8-bit/color RGB, non-interlaced
one can see it's PNG data, it's demensions, and other characteristics that PNG file has.
Now on your local host ... one can cheat ... add an extension to a file like that found on local host and your local host machine will display. Matter of fact, on Mac's, one could actually double click on the file (this one: /moodledata/filedir/ca/22/ca22ce3d03bda9c6b25ed15b58701226dd52b0c8) and the Mac is 'smart enough' to read the file header and open it in Preview. PC's ... think they would need a filename extension.
No, I cannot explain what happened when entire site was migrated from local host to true server.
My experience has been migrating from server to server and can say that as long as I have completed all the steps have had no issues like you've been experiencing.
Do you have phpmyadmin or something where you could make a query of the DB on the server for the file name of one of those images in the quiz?
You could make the same query using PHPMyAdmin changing only the filename:
select contenthash,filename,mimetype,component from mdl_files where filename = 'CHANGETHIS'
Let's see what your DB has.
Also, have asked that you turn on debugging to see what it might have/say. Have also asked that you check your servers web server logs ... error log in particular. Please do.
Think one could drive themselves crazy trying to figure out things by comparing localhost to server ... so concentrate efforts now on the server. That's where the problem is, right? 
'spirit of sharing', Ken