Title: wp_get_missing_image_subsizes
Published: November 12, 2019
Last modified: August 20, 2026

---

# apply_filters( ‘wp_get_missing_image_subsizes’, array[] $missing_sizes, array $image_meta, int $attachment_id )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_get_missing_image_subsizes/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_get_missing_image_subsizes/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_get_missing_image_subsizes/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_get_missing_image_subsizes/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/wp_get_missing_image_subsizes/?output_format=md#wp--skip-link--target)

Filters the array of missing image sub-sizes for an uploaded image.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_get_missing_image_subsizes/?output_format=md#parameters)󠁿

 `$missing_sizes`array[]

Associative array of arrays of image sub-size information for missing image sizes,
keyed by image size name.

`$image_meta`array

The image meta data.

`$attachment_id`int

The image attachment post ID.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/wp_get_missing_image_subsizes/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'wp_get_missing_image_subsizes', $missing_sizes, $image_meta, $attachment_id );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/image.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-admin/includes/image.php#L146)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-admin/includes/image.php#L146-L146)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/wp_get_missing_image_subsizes/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_get_missing_image_subsizes()](https://developer.wordpress.org/reference/functions/wp_get_missing_image_subsizes/)`wp-admin/includes/image.php` |

Compare the existing image sub-sizes (as saved in the attachment meta) to the currently registered image sub-sizes, and return the difference.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/wp_get_missing_image_subsizes/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.3.0](https://developer.wordpress.org/reference/since/5.3.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_get_missing_image_subsizes%2F)
before being able to contribute a note or feedback.