# Skip PDF Preview Images on Upload

> Stops WordPress from generating preview images for every uploaded PDF, which speeds up uploads and saves disk space.

- Type: PHP
- Runs: Run everywhere
- Category: [Performance](https://wpide.com/library/category/performance/)
- Tags: performance, media, pdf
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/skip-pdf-preview-images/

## Code

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

## Notes

PDFs then show a generic document icon in the Media Library.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Skip PDF Preview Images on Upload" 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/
