Firefox can be configured to open or download files of different types while browsing. So you can associate specific file types to directly open with their applications rather than trying to view them in Firefox. These are called Helper Applications.
Here is how to configure them:
Open Firefox and in the address bar, type in:
This will open the General settings page. Scroll down to the Applications section.
A list of different file types and the associated actions for them will be listed here. To change action for a file type, click on the Action drop-down menu.
So, there will be different actions available when Firefox encounters different types of files. It can prompt you to save or open them, directly save them or use Helper Applications to open them.
For example: To always open an image file in an image viewer instead of the Firefox tab, click on the Action drop-down menu and choose Use other.
Then from a list of installed programs that can open those files, choose the specific image viewer as it’s Helper Application.
Similarly, you can associate actions for other different file types like PDF, DOCX, zipped folders, and more by saving them or directly opening them in different Helper Applications.