In Confluence 5.7 and later version, we have the bundled Confluence Previews add-on, which is responsible for creating the preview for the attachments in the instance.
By disabling this add-on, Confluence will not provide the option to preview any file and instead of it, for attachments like PDF, Word, Excel, it will download the file. However, for the images, no option will be provided. Neither to download it or to preview.
This is a feature request to provide an option (or a new module in the add-on) to disable the preview only for specific attachments such as Word, PDF, Excel and the images will still be able to be previewed.
PS: We do have options to disable only the preview for PDF with the following modules:
Confluence Previews PDF webworker resource(confluence-previews-pdf-worker)
Confluence Previews Resources for pdf viewer(confluence-previews-pdf)
However, both will make the preview be displayed, but, the PDF file will keep loading and will not display the file at all, which is not the same behaviour as requested in this one.