No, optimizing the database will only reorganize the information stored. Your media files will remain unchanged.