WordPress filter hook · part of WordPress core

getimagesize_mimes_to_exts

A WordPress core filter that 13 plugins also fire themselves, running on 269K+ sites between them.

How to use getimagesize_mimes_to_exts

It's a filter: your callback receives the value, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'getimagesize_mimes_to_exts', function( $value ) {
	// Change $value here.
	return $value;
}, 10, 1 );

Argument names come from Nextend Social Login and Register's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

This hook is fired by WordPress core too. Official reference on developer.wordpress.org →

13 plugins that fire getimagesize_mimes_to_exts

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. Nextend Social Login and Register icon Nextend Social Login and Register200,000+ installs apply_filters( 'getimagesize_mimes_to_exts', array( 'image/jpeg' => 'jpg', 'image/png' => 'png', 'image/gif' => 'gif', 'image/bmp' => 'bmp', 'image/tiff' => 'tif', 'image/webp' => 'webp' ) ) includes/avatar.php:253
  2. WP RSS Aggregator icon WP RSS Aggregator40,000+ installs apply_filters( 'getimagesize_mimes_to_exts', [ 'image/jpeg' => 'jpg', 'image/png' => 'png', 'image/gif' => 'gif', 'image/bmp' => 'bmp', 'image/tiff' => 'tif', ] ) v4/includes/feed-importing-images.php:1013
  3. Bulk Edit Products for WooCommerce icon Bulk Edit Products for WooCommerce10,000+ installs apply_filters( 'getimagesize_mimes_to_exts', array( 'image/jpeg' => 'jpg', 'image/png' => 'png', 'image/gif' => 'gif', 'image/bmp' => 'bmp', 'image/tiff' => 'tif', 'image/webp' => 'webp', 'image/avif' => 'avif', ) ) modules/wp-sheet-editor/inc/api/helpers.php:2227
  4. Bulk Edit Posts and Products in Spreadsheet icon Bulk Edit Posts and Products in Spreadsheet7,000+ installs apply_filters( 'getimagesize_mimes_to_exts', array( 'image/jpeg' => 'jpg', 'image/png' => 'png', 'image/gif' => 'gif', 'image/bmp' => 'bmp', 'image/tiff' => 'tif', 'image/webp' => 'webp', 'image/avif' => 'avif', ) ) modules/wp-sheet-editor/inc/api/helpers.php:2227
  5. WPMasterToolKit (WPMTK) icon WPMasterToolKit (WPMTK)5,000+ installs apply_filters( 'getimagesize_mimes_to_exts', array( 'image/jpeg' => 'jpg', 'image/png' => 'png', 'image/gif' => 'gif', 'image/bmp' => 'bmp', 'image/tiff' => 'tif', 'image/webp' => 'webp' ) ) admin/modules/core/class-social-login.php:1700
  6. Bulk Edit Categories and Tags icon Bulk Edit Categories and Tags3,000+ installs apply_filters( 'getimagesize_mimes_to_exts', array( 'image/jpeg' => 'jpg', 'image/png' => 'png', 'image/gif' => 'gif', 'image/bmp' => 'bmp', 'image/tiff' => 'tif', 'image/webp' => 'webp', 'image/avif' => 'avif', ) ) modules/wp-sheet-editor/inc/api/helpers.php:2227
  7. WP Sync for Notion icon WP Sync for Notion1,000+ installs apply_filters( 'getimagesize_mimes_to_exts', array( 'image/jpeg' => 'jpg', 'image/png' => 'png', 'image/gif' => 'gif', 'image/bmp' => 'bmp', 'image/tiff' => 'tif', 'image/webp' => 'webp', ) ) includes/class-notion-wp-sync-attachments-manager.php:91
  8. Air WP Sync icon Air WP Sync1,000+ installs apply_filters( 'getimagesize_mimes_to_exts', array( 'image/jpeg' => 'jpg', 'image/png' => 'png', 'image/gif' => 'gif', 'image/bmp' => 'bmp', 'image/tiff' => 'tif', 'image/webp' => 'webp', ) ) includes/formatters/class-air-wp-sync-attachments-formatter.php:67
  9. Bulk Edit and Create User Profiles icon Bulk Edit and Create User Profiles1,000+ installs apply_filters( 'getimagesize_mimes_to_exts', array( 'image/jpeg' => 'jpg', 'image/png' => 'png', 'image/gif' => 'gif', 'image/bmp' => 'bmp', 'image/tiff' => 'tif', 'image/webp' => 'webp', 'image/avif' => 'avif', ) ) modules/wp-sheet-editor/inc/api/helpers.php:2227
  10. Bulk Edit Coupons for WooCommerce icon Bulk Edit Coupons for WooCommerce500+ installs apply_filters( 'getimagesize_mimes_to_exts', array( 'image/jpeg' => 'jpg', 'image/png' => 'png', 'image/gif' => 'gif', 'image/bmp' => 'bmp', 'image/tiff' => 'tif', 'image/webp' => 'webp', 'image/avif' => 'avif', ) ) modules/wp-sheet-editor/inc/api/helpers.php:2227
  11. Bulk Edit Events icon Bulk Edit Events100+ installs apply_filters( 'getimagesize_mimes_to_exts', array( 'image/jpeg' => 'jpg', 'image/png' => 'png', 'image/gif' => 'gif', 'image/bmp' => 'bmp', 'image/tiff' => 'tif', 'image/webp' => 'webp', 'image/avif' => 'avif', ) ) modules/wp-sheet-editor/inc/api/helpers.php:2227
  12. Bulk Edit Easy Digital Downloads icon Bulk Edit Easy Digital Downloads80+ installs apply_filters( 'getimagesize_mimes_to_exts', array( 'image/jpeg' => 'jpg', 'image/png' => 'png', 'image/gif' => 'gif', 'image/bmp' => 'bmp', 'image/tiff' => 'tif', 'image/webp' => 'webp', 'image/avif' => 'avif', ) ) modules/wp-sheet-editor/inc/api/helpers.php:2227
  13. Metaxy Shop Connector icon Metaxy Shop ConnectorFewer than 10 installs apply_filters( 'getimagesize_mimes_to_exts', array( 'image/jpeg' => 'jpg', 'image/png' => 'png', 'image/gif' => 'gif', 'image/bmp' => 'bmp', 'image/tiff' => 'tif', 'image/webp' => 'webp', ) ) MetaxyShopConnector.php:56

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.