# Disable PDF Preview Images

> Stops WordPress from generating preview images for every uploaded PDF, saving disk space and server time when you upload many documents.

- Type: PHP
- Runs: Run everywhere
- Category: [Media](https://wpide.com/library/category/media/)
- Tags: pdf, uploads, thumbnails
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/disable-pdf-thumbnails/

## Code

```php
add_filter( 'fallback_intermediate_image_sizes', '__return_empty_array' );
```

## Notes

PDFs uploaded while this is active show a generic document icon in the Media Library.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Disable PDF Preview Images" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
